From: stronk7 Date: Mon, 10 Apr 2006 23:07:37 +0000 (+0000) Subject: Strip the "_utf8" suffix from language names in list of languages. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1a8bdfc430a0bed3f61d2e9de97d12ece6034141;p=moodle.git 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) --- diff --git a/install.php b/install.php index 4af6ab35c6..4d4703385f 100644 --- a/install.php +++ b/install.php @@ -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); }