• Resolved Linkaara

    (@linkaara)


    Hello
    I am working on a functionality which loads some content which has to be on the language the user has selected, but this content is loaded from the server/PHP side; so I wonder how can I know the language previously chosen by the user, from PHP? I was expecting some kind of global variable on PHP but I don′t find it.
    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    You may check for googtrans cookie in free version or if you are using our paid version, you can check for $_SERVER[‘HTTP_X_GT_LANG’] which will be set if the user is on a translated language.

    I recommend doing it using javascript instead, so pages can be cached properly.

    Read more: How to detect current selected language?

    Thanks! ??

    • This reply was modified 4 years, 7 months ago by edo888.
Viewing 1 replies (of 1 total)
  • The topic ‘Get Language from PHP’ is closed to new replies.