git.p6c8.net
/
jirafeau_mojo42.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translated using Weblate (Greek)
[jirafeau_mojo42.git]
/
lib
/
lang.php
diff --git
a/lib/lang.php
b/lib/lang.php
index 4502f5aa50f5325a2bdfbf5fd6e984b7cf102e17..d636b8d944424b53672a8aaf28bd338b8dd89e9c 100644
(file)
--- a/
lib/lang.php
+++ b/
lib/lang.php
@@
-27,7
+27,8
@@
$languages_list = array ('auto' => 'Automatic',
'it' => 'Italiano',
\r
'nl' => 'Nederlands',
\r
'ro' => 'Limba română',
\r
'it' => 'Italiano',
\r
'nl' => 'Nederlands',
\r
'ro' => 'Limba română',
\r
- 'sk' => 'Slovenčina');
\r
+ 'sk' => 'Slovenčina',
\r
+ 'zh' => '汉语');
\r
\r
/* Translation */
\r
function t ($text)
\r
\r
/* Translation */
\r
function t ($text)
\r
@@
-37,7
+38,12
@@
function t ($text)
\r
/* Detect user's langage if we are in automatic mode. */
\r
if (strcmp ($cfg['lang'], 'auto') == 0)
\r
\r
/* Detect user's langage if we are in automatic mode. */
\r
if (strcmp ($cfg['lang'], 'auto') == 0)
\r
- $l = substr ($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
\r
+ {
\r
+ if (isset ($_SERVER['HTTP_ACCEPT_LANGUAGE']))
\r
+ $l = substr ($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
\r
+ else
\r
+ $l = "en";
\r
+ }
\r
else
\r
$l = $cfg['lang'];
\r
\r
else
\r
$l = $cfg['lang'];
\r
\r
@@
-75,7
+81,12
@@
function json_lang_generator ()
\r
/* Detect user's langage if we are in automatic mode. */
\r
if (strcmp ($cfg['lang'], 'auto') == 0)
\r
\r
/* Detect user's langage if we are in automatic mode. */
\r
if (strcmp ($cfg['lang'], 'auto') == 0)
\r
- $l = substr ($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
\r
+ {
\r
+ if (isset ($_SERVER['HTTP_ACCEPT_LANGUAGE']))
\r
+ $l = substr ($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
\r
+ else
\r
+ $l = "en";
\r
+ }
\r
else
\r
$l = $cfg['lang'];
\r
\r
else
\r
$l = $cfg['lang'];
\r
\r
patrick-canterino.de