\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