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
Add link title + direct download link
[jirafeau_mojo42.git]
/
lib
/
lang.php
diff --git
a/lib/lang.php
b/lib/lang.php
index fac69d5800e92d6b73c8accc850434bbca8f8d58..79e32d2fc7f4908528f9e7b8498a884992f9c856 100644
(file)
--- a/
lib/lang.php
+++ b/
lib/lang.php
@@
-21,7
+21,7
@@
global $languages_list;
$languages_list = array ('auto' => 'Automatic',
\r
'de' => 'Deutsch',
\r
'en' => 'English',
\r
$languages_list = array ('auto' => 'Automatic',
\r
'de' => 'Deutsch',
\r
'en' => 'English',
\r
- 'h
g' => 'm
agyar',
\r
+ 'h
u' => 'M
agyar',
\r
'fi' => 'Suomi',
\r
'fr' => 'Français',
\r
'it' => 'Italiano',
\r
'fi' => 'Suomi',
\r
'fr' => 'Français',
\r
'it' => 'Italiano',
\r
@@
-37,7
+37,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
+80,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