Skip to content

Commit

Permalink
Strip the "_utf8" suffix from language names in list of languages.
Browse files Browse the repository at this point in the history
Special info showed for non-utf8 English.
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)
  • Loading branch information
stronk7 committed Apr 10, 2006
1 parent 6346748 commit 1a8bdfc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1a8bdfc

Please sign in to comment.