Popular automatic website translation tool


Postby Develio13 » Tue May 15, 2012 11:42 pm

I've removed the code from here as decisions further up have decided I'm not allowed to share the code used to achieve the final result, as it's to be used as an advantage to our company's site features that others have yet to be able to implement. (Not saying others haven't already done it, as it's definitely possible.)

What was the code for? An automatic redirect on visit to display the site in the clients native language, such as an iPad set to 'German' will see the German version of the site, or a google account set to Japanese will see the Japanese version in Google Chrome, or a Korean Windows PC will see the Korean version in Internet Explorer and so on.
Last edited by Develio13 on Wed May 16, 2012 5:00 pm, edited 1 time in total.
Posts: 6
Joined: Wed Dec 07, 2011 5:39 am

Re: .htaccess automatic redirect based on browser language?

Postby Edvard » Wed May 16, 2012 12:03 am

You may use %{HTTP:X-GT-Lang} in RewriteCond to detect the requests made from our server to avoid the infinite loop.

I think it would be easier to do the same with PHP in your index.php. In that case you can use $_SERVER['HTTP_X_GT_LANG'] variable to detect requests from us.

Also take into account that sometimes users may want to use the default instead of their browser defined language. So cookies will help to achieve that too.

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

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest