Strip the "_utf8" suffix from language names in list of languages.

Special info showed for non-utf8 English.
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
This commit is contained in:
stronk7
2006-04-10 23:07:37 +00:00
parent 6346748fec
commit 1a8bdfc430
+9 -1
View File
@@ -968,8 +968,16 @@ function get_installer_list_of_languages() {
foreach ($langdirs as $lang) {
if (file_exists($CFG->dirroot .'/install/lang/'. $lang .'/installer.php')) {
include($CFG->dirroot .'/install/lang/'. $lang .'/installer.php');
if (substr($lang, -5) == '_utf8') { //Remove the _utf8 suffix from the lang to show
$shortlang = substr($lang, 0, -5);
} else {
$shortlang = $lang;
}
if ($lang == 'en') { //Explain this is non-utf8 en
$shortlang = 'non-utf8 en';
}
if (!empty($string['thislanguage'])) {
$languages[$lang] = $string['thislanguage'] .' ('. $lang .')';
$languages[$lang] = $string['thislanguage'] .' ('. $shortlang .')';
}
unset($string);
}