Detect browser language [Enterprise]

Popular automatic website translation tool

Detect browser language [Enterprise]

Postby advwebbing » Sat Mar 01, 2014 9:54 pm

Hi,
I'm using the ENTERPRISE version.
Is it possible to detect users' browser language and automatically make the site/post appear in that language (if available) for them?

Thanks,
Luk
advwebbing
 
Posts: 12
Joined: Wed Feb 26, 2014 9:23 pm

Re: Detect browser language [Enterprise]

Postby advwebbing » Mon Mar 03, 2014 8:47 pm

any suggestion?
advwebbing
 
Posts: 12
Joined: Wed Feb 26, 2014 9:23 pm

Re: Detect browser language [Enterprise]

Postby Edvard » Tue Mar 04, 2014 11:15 am

Hi,

You need to use 2 variables in your code to make appropriate redirects:

$_SERVER['HTTP_X_GT_LANG'] - not set if original language is selected, selected language code (en, es, fr, it, etc...)

$user_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); - browser language code ex (en, es, fr, de, etc...)

You will need to write code yourself using this 2 variables, we do not suggest using this method and do not provide code.

Thanks!
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron