git.p6c8.net
/
jirafeau_project.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[FEATURE] Add Gitlab CI
[jirafeau_project.git]
/
lib
/
lang.php
diff --git
a/lib/lang.php
b/lib/lang.php
index fac69d5800e92d6b73c8accc850434bbca8f8d58..bf6365977f4531c4cd2055b637b0f7eaec7bf403 100644
(file)
--- a/
lib/lang.php
+++ b/
lib/lang.php
@@
-21,13
+21,17
@@
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
- 'hg' => 'magyar',
\r
+ 'el' => 'Ελληνικά',
\r
+ 'es' => 'Español',
\r
+ 'hu' => 'Magyar',
\r
'fi' => 'Suomi',
\r
'fr' => 'Français',
\r
'it' => 'Italiano',
\r
'nl' => 'Nederlands',
\r
'ro' => 'Limba română',
\r
'fi' => 'Suomi',
\r
'fr' => 'Français',
\r
'it' => 'Italiano',
\r
'nl' => 'Nederlands',
\r
'ro' => 'Limba română',
\r
- 'sk' => 'Slovenčina');
\r
+ 'ru' => 'ру́сский',
\r
+ 'sk' => 'Slovenčina',
\r
+ 'zh' => '汉语');
\r
\r
/* Translation */
\r
function t ($text)
\r
\r
/* Translation */
\r
function t ($text)
\r
@@
-37,7
+41,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
+84,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
@@
-91,7
+105,7
@@
function json_lang_generator ()
\r
/* Open translation file. */
\r
$trans_j = file_get_contents (JIRAFEAU_ROOT . "lib/locales/$l.json");
\r
\r
/* Open translation file. */
\r
$trans_j = file_get_contents (JIRAFEAU_ROOT . "lib/locales/$l.json");
\r
- return $trans_j;
\r
+ return $trans_j;
\r
}
\r
\r
?>
\r
}
\r
\r
?>
\r
patrick-canterino.de