$languages_list = array ('auto' => 'Automatic',\r
'de' => 'Deutsch',\r
'en' => 'English',\r
- 'fr' => 'Français');\r
+ 'fi' => 'Suomi'\r
+ 'fr' => 'Français',\r
+ 'it' => 'Italiano');\r
\r
/* Translation */\r
function t ($text)\r
\r
/* Decode JSON. */\r
$trans = json_decode ($trans_j, true);\r
- error_log(print_r($trans, true));\r
if ($trans === NULL)\r
return $text;\r
\r
/* Try to find translation. */\r
- $translation = $trans[$text];\r
- if (empty ($translation))\r
+ if (!array_key_exists ($text, $trans))\r
return $text;\r
\r
- return $translation;\r
+ return $trans[$text];\r
}\r
\r
?>\r