From: stronk7 Date: Wed, 29 Mar 2006 16:18:46 +0000 (+0000) Subject: Now new lang packs won't be available until UTF-8 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=063716bad970d9ea76af4f5fc53cdd6668a8302d;p=moodle.git Now new lang packs won't be available until UTF-8 migration was performed. Until then, only "en" and old lang packs will be available. The opposite is also true: only new lang packs will be available once the UTF-8 migration was performed. --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index f8e8997c24..4181946c41 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -4936,6 +4936,12 @@ function get_list_of_languages() { continue; } /// Search under dirroot/lang + /// If $CFG->unicodedb = false, ignore new lang packs + if (empty($CFG->unicodedb)) { + if (file_exists($CFG->dirroot .'/lang/'. $lang .'/langconfig.php')) { + continue; + } + } if (file_exists($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck)) { include($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck); if (!empty($string['thislanguage'])) { @@ -4944,6 +4950,12 @@ function get_list_of_languages() { unset($string); } /// And moodledata/lang + /// If $CFG->unicodedb = false, ignore new lang packs + if (empty($CFG->unicodedb)) { + if (file_exists($CFG->dataroot .'/lang/'. $lang .'/langconfig.php')) { + continue; + } + } if (file_exists($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck)) { include($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck); if (!empty($string['thislanguage'])) { @@ -4966,6 +4978,13 @@ function get_list_of_languages() { if (strstr('_local',$lang)!==false) { continue; } + /// Search under moodledata/lang + /// If $CFG->unicodedb = false, ignore new lang packs + if (empty($CFG->unicodedb)) { + if (file_exists($CFG->dataroot .'/lang/'. $lang .'/langconfig.php')) { + continue; + } + } if (file_exists($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck)) { include($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck); if (!empty($string['thislanguage'])) { @@ -4973,6 +4992,13 @@ function get_list_of_languages() { } unset($string); } + /// And dirroot/lang + /// If $CFG->unicodedb = false, ignore new lang packs + if (empty($CFG->unicodedb)) { + if (file_exists($CFG->dirroot .'/lang/'. $lang .'/langconfig.php')) { + continue; + } + } if (file_exists($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck)) { include($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck); if (!empty($string['thislanguage'])) {