$maxLength) $maxLength = strlen($moduleName); } foreach($modules as $modulePath) { $moduleName = basename($modulePath); if($moduleName == 'help' or $moduleName == 'editor') continue; $langFile = $modulePath . "/lang/$langType.php"; if(!file_exists($langFile)) continue; include $langFile; $moduleTitle = ''; if(isset($lang->$moduleName->common)) { $moduleTitle = $lang->$moduleName->common; } echo "\$lang->editor->modules['$moduleName'] " . str_pad('', $maxLength - strlen($moduleName)) . "= '$moduleTitle';\n"; }