Support » Plugin: Translate WordPress with GTranslate » How to get de current languea in php?

  • Resolved elbolsa

    (@elbolsa)


    Hello!, can you help me? i need now the current language selected in backend in php because i need reconstruct de hamburger menĂº after change post or page?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    If you are using the paid version, you can get it from $_SERVER[‘HTTP_X_GT_LANG’].

    If you are using free version, it will be available in googtrans cookie in the following format /AA/BB, where AA is your original language and BB is the translated language.

    Thanks!

    Can you put here the snippet to read this cookie? thanks a lot.

    Plugin Author edo888

    (@edo888)

    Hi,

    It will be $_COOKIE['gootrans'].

    Thanks!

    Thanksss!!!!

    i use this code:
    if(isset($_COOKIE[‘googtrans’]))
    {
    $cookieGootrans = $_COOKIE[ “googtrans” ];
    }

    and Hamburger menu look fine!

    Plugin Author edo888

    (@edo888)

    Good to hear that.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to get de current languea in php?’ is closed to new replies.