* GNU Affero General Public License for more details.\r
*\r
* You should have received a copy of the GNU Affero General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.\r
*/\r
\r
- global $languages_list;\r
- $languages_list = array ('auto' => 'Automatic',\r
- 'en' => 'English',\r
- 'fr' => 'Français');\r
+global $languages_list;\r
+$languages_list = array ('auto' => 'Automatic',\r
+ 'de' => 'Deutsch',\r
+ 'en' => 'English',\r
+ 'fi' => 'Suomi',\r
+ 'fr' => 'Français',\r
+ 'it' => 'Italiano',\r
+ 'nl' => 'Nederlands',\r
+ 'ro' => 'Limba română',\r
+ 'sk' => 'Slovenčina');\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