Identifying what language has been selected

Popular automatic website translation tool

Identifying what language has been selected

Postby cusinger » Thu Mar 27, 2014 1:30 am

Is there a way to set a cookie when someone has chosen a specific language? I want to send them to a different website depending on the language that they are using.

Posts: 2
Joined: Thu Mar 27, 2014 1:20 am

Re: Identifying what language has been selected

Postby Yana » Thu Mar 27, 2014 11:33 am

You can detect current selected language:
For GTranslate Pro Joomla system plugin it is JSession::get('glang');
For the GTrnslate Pro General version it is $_GET['glang'] variable. If you are using Gtranslate Enterprise version you can find the current selected language code from X-GT-Lang request header. You can find it in _SERVER['HTTP_X_GT_LANG'] variable.

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Posts: 4087
Joined: Thu Jan 12, 2012 6:21 pm

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests