From: tokul Date: Fri, 29 Jul 2005 16:39:54 +0000 (+0000) Subject: automatic translation loading code. disabled, see comments. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=89b3545c36317e3770698b9010aaca5fc7ec0f6c;p=squirrelmail.git automatic translation loading code. disabled, see comments. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9845 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/i18n.php b/functions/i18n.php index 779734de..a04aa6a1 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -927,7 +927,6 @@ if (! sqgetGlobalVar('squirrelmail_language',$squirrelmail_language,SQ_COOKIE)) * * Each 'language' definition requires NAME+CHARSET or ALIAS variables. * - * @todo TODO: make language loading modular (similar to plugins, with locale/xx_XX/setup.php files) * @name $languages * @global array $languages */ @@ -1203,6 +1202,27 @@ $languages['ug']['NAME'] = 'Uighur'; $languages['ug']['CHARSET'] = 'utf-8'; $languages['ug']['DIR'] = 'rtl'; +/** + * Automatic translation loading from setup.php files. + * Solution for bug. 1240889. + * setup.php file can contain $languages array entries and XTRA_CODE functions. + * I don't want to enable it, because it allows to keep own translations without + * submitting them to SquirrelMail. + */ +/* +foreach(glob(SM_PATH.'locale/*') as $lang_dir) { + // remove trailing slash, if present + if (substr($lang_dir,-1)=='/') { + $lang_dir = substr($lang_dir,0,-1); + } + // load language setup + if (is_dir(SM_PATH.'locale/'.$lang_dir) && + file_exists(SM_PATH.'locale/'.$lang_dir.'/setup.php')) { + include_once(SM_PATH.'locale/'.$lang_dir.'/setup.php'); + } +} +*/ + /* Detect whether gettext is installed. */ $gettext_flags = 0; if (function_exists('_')) {