View Issue Details

IDProjectCategoryView StatusLast Update
0003399OXID eShop (all versions)2. ----- eShop backend (admin) -----public2012-12-10 15:34
Reporter[email protected] Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.4 revision 39463 
Fixed in Version4.6.0_beta3 
Summary0003399: Admin language selection from modules directory
DescriptionIn 4.5 version you made changes for frontend languages, added what languages can be getted from module dir. (oxLang::_getLangFilesPathArray)

it would be nice to have same functionality for admin languages also:

Additional Informationfor modules you created:
$aModuleFiles = glob(getShopBasePath().'/modules/*/out/lang/' . $sLang . '/*_lang.php');
if (is_array($aModuleFiles) && count($aModuleFiles)) {
   $aLangFiles = array_merge( $aLangFiles, $aModuleFiles );
}

for admin maybe it should be done like this:
old one:
if ( $blAdmin ) {

            $sAdminPath = $sOutDir . 'admin/' . $sLang . '/';
            $aLangFiles[] = $sAdminPath . "lang.php";
            $aTmpFiles = glob( $sAdminPath."*_lang.php" );
            if ( is_array( $aTmpFiles ) && count( $aTmpFiles ) ) {
                $aLangFiles = array_merge( $aLangFiles, $aTmpFiles);
            }
            return count( $aLangFiles ) ? $aLangFiles : false;
        }

change to:

if ( $blAdmin ) {

            $sAdminPath = $sOutDir . 'admin/' . $sLang . '/';
            $aLangFiles[] = $sAdminPath . "lang.php";
            $aTmpFiles = glob( $sAdminPath."*_lang.php" );
            if ( is_array( $aTmpFiles ) && count( $aTmpFiles ) ) {
                $aLangFiles = array_merge( $aLangFiles, $aTmpFiles);
            }
           $aModuleAdminFiles = glob($sOutDir.'/modules/*/out/admin/' . $sLang . '/*_lang.php');
if (is_array($aModuleAdminFiles ) && count($aModuleAdminFiles )) {
   $aLangFiles = array_merge( $aLangFiles, $aModuleAdminFiles );
}

            return count( $aLangFiles ) ? $aLangFiles : false;
        }

or similar to it.

p.s. code not checked.
TagsNo tags attached.
Theme
Browser
PHP Version
Database Version

Activities

[email protected]

2011-11-29 08:58

reporter   ~0005451

upd:
not $sOutDir
but:
getShopBasePath()

Linas Kukulskis

2012-01-24 14:15

reporter   ~0005644

added feature load lang files for admin from modules.
files mys be stored: module/module_name/out/admin/en and etc