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.
This commit is contained in:
stronk7
2006-03-29 16:18:46 +00:00
parent 004bd0cc39
commit 063716bad9
+26
View File
@@ -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'])) {