Comment to 'Default language'
Comment to Default language
  • Hello xdiag !

    I may suggest that this language isn't primary in your browser then by default UNA shows you another one by the first visit. The following code forms the language's choosing:

            if(!$sLang && !empty($_GET['lang']))

                $sLang = $this->tryToGetLang($_GET['lang'], $bSetCookie);

            if(!$sLang && !empty($_POST['lang']))

                $sLang = $this->tryToGetLang($_POST['lang'], $bSetCookie);

            if(!$sLang && !empty($_COOKIE['lang']))

                $sLang = $this->tryToGetLang($_COOKIE['lang']);

            if(!$sLang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']))

                $sLang = $this->tryToGetLang($_SERVER['HTTP_ACCEPT_LANGUAGE']);

            if(!$sLang)

                $sLang = $this->tryToGetLang(getParam('lang_default'));

            if(!$sLang)

                $sLang = $this->tryToGetLang(BX_DOL_LANGUAGE_DEFAULT);

    The bold lines show the taking language according to admin's setup.