summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/lib/l10n.php2
-rw-r--r--pages/wot/9.php11
2 files changed, 10 insertions, 3 deletions
diff --git a/includes/lib/l10n.php b/includes/lib/l10n.php
index 85b7aff..468562c 100644
--- a/includes/lib/l10n.php
+++ b/includes/lib/l10n.php
@@ -64,7 +64,7 @@ class L10n {
*
* @var array(string => string)
*/
- private static $locales = array(
+ public static $locales = array(
"ar" => "ar_JO",
"bg" => "bg_BG",
"cs" => "cs_CZ",
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>