View Issue Details

IDProjectCategoryView StatusLast Update
0004527OXID eShop (all versions)4.06. Language and translationspublic2012-11-20 15:08
ReporterWBL_BjoernLange 
PriorityhighSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.0_5.0.0_beta2 
Target Version4.8.0_5.1.0_beta1Fixed in Version4.7.1 / 5.0.1 revision 52468 
Summary0004527: Module-Language-Data can not be overwritten
DescriptionoxLang::_getLangFilesPathArray loads the custom language files prior the module language files in the modules dir. There is no way overloading the module language from the modules-Dir except from adding a module.

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

            // themes options lang files
            $sThemePath = $sOutDir . '*/' . $sLang . '/theme_options.php';
            $aTmpFiles = glob( $sThemePath );
            if ( is_array( $aTmpFiles ) && count( $aTmpFiles ) ) {
                $aLangFiles = array_merge( $aLangFiles, $aTmpFiles);
            }

            //load admin modules lang files
            if ( is_array( $aModuleInfo ) ) {
                foreach ( $aModuleInfo as $sPath ) {
                    $aModuleFiles = glob( $myConfig->getModulesDir().$sPath.'/out/admin/' . $sLang . '/*_lang.php' );
                    if ( is_array( $aModuleFiles ) && count( $aModuleFiles ) ) {
                        $aLangFiles = array_merge( $aLangFiles, $aModuleFiles );
                    }


Imho this approach blocks developers, to load languages from the module dir directly because the customer is not able to change the language texts of a module. The better way would be, to load the custom-files after the module files.



TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

WBL_BjoernLange

2012-10-03 18:44

reporter   ~0007543

Last edited: 2012-10-03 22:35

View 2 revisions

The result should be, as usual, the cust_lang.php should overwrite the core and the module language.

Linas Kukulskis

2012-11-20 15:08

reporter   ~0007915

fixed,

cust_lang.php overwrites even module files.