Automatically translate if user’s is from abroad
-
I’d like to ask if I can make GTranslate to automatically translate website if visitor is from outside Poland? Websites main language is Polish. Maybe there’s a function to retrieve browsers language? I tried something like this to check browser language:
<?php $local = get_user_locale(); echo $local; ?>
All it echoes me is still pl-PL even if I set browser language to English (US). I want to write a code that:
if($local !=='pl-PL') {// inject googtrans cookie with value of '/pl/en'}
I think that would translate page after it loads. If there’s any better way to force automatic translation depending on browser language or user location I’d be thankful to hear about.
The page I need help with: [log in to see the link]
- The topic ‘Automatically translate if user’s is from abroad’ is closed to new replies.