X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=05eef6c6e0bfe0f2e7475b29798ff96866702e6d;hb=ef64c5187df80da2065655726b8d05a9ce6b0e0a;hp=ab722df2aa3533ff5a99058473213ee771a6281e;hpb=6b37e6d48d8d7a313d2eb88155752241c6c930d5;p=friendica.git diff --git a/index.php b/index.php index ab722df2aa..05eef6c6e0 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,7 @@ config['system']['language'])) ? $a->config['system']['language'] : 'en'); } + load_translation_table($lang); @@ -86,6 +89,19 @@ $a->init_pagehead(); session_start(); +/** + * Language was set earlier, but we can over-ride it in the session. + * We have to do it here because the session was just now opened. + */ + +if(x($_POST,'system_language')) + $_SESSION['language'] = $_POST['system_language']; +if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) { + $lang = $_SESSION['language']; + load_translation_table($lang); +} + + /** * * For Mozilla auth manager - still needs sorting, and this might conflict with LRDD header.