• Hi.

    When I open a browser and enter the address of my site, the site is displayed in the language of the browser. But when I close the site tab and enter again the site name in new tab, the site now is displayed in the language defined in the plugin settings Default Language / Order. In fact the user can open the site in their own language only once. If he opens the site in new tab, site is diaplayed now no in the browser language but in the Default Language. It’s very strange … that the browser language detection only works the first time after opening the browser. Is it possible to fix it?

    https://www.ads-software.com/plugins/mqtranslate/

Viewing 1 replies (of 1 total)
  • Thread Starter palmaross

    (@palmaross)

    Currently I fixed this bug for myself this way:

    in the file mqtranslate_core.php line 99:

    if ($ q_config ['detect_browser_language'] && $ q_config ['url_info'] ['redirect'] &&! isset ($ _COOKIE ['qtrans_cookie_test']) && $ q_config ['url_info'] ['language'] == $ q_config ['default_language']) {

    I removed &&! isset ($ _COOKIE ['qtrans_cookie_test']):

    if ($ q_config ['detect_browser_language'] && $ q_config ['url_info'] ['redirect'] && $ q_config ['url_info'] ['language'] == $ q_config ['default_language']) {

    Checkbox “Hide URL language information for default language” in this case must be checked.

    Now everything works fine (tested thoroughly, no pitfalls detected), but I still have doubts about !isset ($ _COOKIE ['qtrans_cookie_test']) – if it has importance for something?

Viewing 1 replies (of 1 total)
  • The topic ‘Detect the language of the browser’ is closed to new replies.