]> git.mjollnir.org Git - moodle.git/commitdiff
Strip the "_utf8" suffix in one more place. Thanks Mina!
authorstronk7 <stronk7>
Tue, 11 Apr 2006 07:55:26 +0000 (07:55 +0000)
committerstronk7 <stronk7>
Tue, 11 Apr 2006 07:55:26 +0000 (07:55 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=4924)

admin/langimport.php

index 0cec761d589753a7a290d1ee54c290b386bf1b5b..078067dfbde686ef9eb1897b457e83054a89be8b 100755 (executable)
             foreach ($availablelangs as $alang) {
                 if (trim($alang[0]) != "en_utf8") {
                     if ($remote){
+                        if (substr($alang[0], -5) == '_utf8') {   //Remove the _utf8 suffix from the lang to show
+                            $shortlang = substr($alang[0], 0, -5);
+                        } else {
+                            $shortlang = $alang[0];
+                        }
                         if (!is_installed_lang($alang[0], $alang[1])){    //if not already installed
-                            echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$alang[0].')</option>';
+                            echo '<option value="'.$alang[0].'">'.$alang[2].' ('.$shortlang.')</option>';
                         }
                     } else {    //print list in local format, and instruction to install
                         echo '<tr><td>'.$alang[2].'</td><td><a href="http://download.moodle.org/lang16/'.$alang[0].'.zip">'.get_string('download','admin').'</a>';