aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-23 10:16:03 -0300
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-23 10:16:03 -0300
commitbc389ff9341d8efec367b2b07c2d1b55be11b8d0 (patch)
treea8bff2409bc07bad6315d530d386e74bb6d3f561 /index.php
parent691801120d4322364475f24bdd484ec0ede1ae7b (diff)
downloadvolse-hubzilla-bc389ff9341d8efec367b2b07c2d1b55be11b8d0.tar.gz
volse-hubzilla-bc389ff9341d8efec367b2b07c2d1b55be11b8d0.tar.bz2
volse-hubzilla-bc389ff9341d8efec367b2b07c2d1b55be11b8d0.zip
Language selection: case-insensitive and system language
Fixed ignoring HTTP_ACCEPT_LANGUAGE tags that had uppercase characters. Fixed defining a->language too soon to ever get the system lang
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/index.php b/index.php
index 5f0ff9834..5a9ec1026 100755
--- a/index.php
+++ b/index.php
@@ -27,9 +27,6 @@ $a->install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? fal
@include(".htconfig.php");
-$a->language = get_best_language();
-
-
/**
*
* Try to open the database;
@@ -54,6 +51,7 @@ if(! $a->install) {
load_hooks();
call_hooks('init_1');
+ $a->language = get_best_language();
load_translation_table($a->language);
// Force the cookie to be secure (https only) if this site is SSL enabled. Must be done before session_start().
@@ -69,6 +67,7 @@ if(! $a->install) {
}
else {
// load translations but do not check plugins as we have no database
+ $a->language = get_best_language();
load_translation_table($a->language,true);
}