mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:05:16 +02:00
Merge branch 'omigeot-master'
This commit is contained in:
commit
0d161c6ef6
2 changed files with 14 additions and 7 deletions
|
@ -31,10 +31,17 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false
|
|||
*
|
||||
* Get the language setting directly from system variables, bypassing get_config()
|
||||
* as database may not yet be configured.
|
||||
*
|
||||
* If possible, we use the value from the browser.
|
||||
*
|
||||
*/
|
||||
|
||||
$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
|
||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$langs = preg_split("/[,-]/",$_SERVER['HTTP_ACCEPT_LANGUAGE'],2);
|
||||
$lang = $langs[0];
|
||||
} else {
|
||||
$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
|
||||
}
|
||||
|
||||
load_translation_table($lang);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue