bug-1280: Parse the language code from the locale.
authorFelix Dörre <felix@dogcraft.de>
Tue, 10 Jun 2014 22:20:43 +0000 (00:20 +0200)
committerFelix Dörre <felix@dogcraft.de>
Tue, 10 Jun 2014 22:25:14 +0000 (00:25 +0200)
Splitting the string at "_" and lowering the characters.

pages/wot/9.php

index a8b9413..94523f2 100644 (file)
 <? if($userlang != "") { ?>
   <tr>
     <td class="DataTD"><?=_("Language")?>:</td>
-    <td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), sanitizeHTML($user['fname']), L10n::$translations[$userlang]) ?></td>
+    <?
+    $parts = explode("_", $userlang ,2);
+    $printlang = strtolower($parts[0]);
+    ?>
+    <td class="DataTD" align="left"><? printf(_("%s prefers to be contacted in %s"), sanitizeHTML($user['fname']), L10n::$translations[$printlang]) ?></td>
   </tr>
 <? } ?>
 <?