summaryrefslogtreecommitdiff
path: root/pages/wot/9.php
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-06-11 17:04:12 +0200
committerFelix Dörre <felix@dogcraft.de>2014-06-11 17:09:15 +0200
commit0730c9df3eb440205d7963e3c0762765d9b47031 (patch)
tree8b83a90422ccebf1ad4b0c2b46d765f2de861483 /pages/wot/9.php
parentf3885b3bc9ff61da78fb541151f16b0ecfdf62eb (diff)
downloadcacert-devel-0730c9df3eb440205d7963e3c0762765d9b47031.tar.gz
cacert-devel-0730c9df3eb440205d7963e3c0762765d9b47031.tar.xz
cacert-devel-0730c9df3eb440205d7963e3c0762765d9b47031.zip
bug-1280: Handle more different types of "languages":
- zh_CN => zh-cn (in various cases: ZH_cn, zh_cn, ...) - de => de (what the current GUI produces) - de_DE => de, en_AU => en, EN_AU => en (what may be left in the database) ... and more creative upper/lower-cases
Diffstat (limited to 'pages/wot/9.php')
-rw-r--r--pages/wot/9.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/pages/wot/9.php b/pages/wot/9.php
index 94523f2..d04c4fa 100644
--- a/pages/wot/9.php
+++ b/pages/wot/9.php
@@ -50,8 +50,15 @@
<tr>
<td class="DataTD"><?=_("Language")?>:</td>
<?
- $parts = explode("_", $userlang ,2);
- $printlang = strtolower($parts[0]);
+ $parts = explode("_", $userlang ,2);
+ if(count($parts == 2)){
+ $printlang = array_search( strtolower($parts[0])."_".strtoupper($parts[1]), L10n::$locales);
+ if($printlang === false){
+ $printlang = $parts[0];
+ }
+ }else{
+ $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>