0

Possible Duplicate:
JavaScript for detecting browser language preference
How to getting browser current locale preference using javascript?

I have a wordpress website that I am in the works of localizing. I don't really have much php or javascript knowledge, and don't really know what I am looking for in terms of doing this.

I have a support tab that users can click to go to my helpdesk. I can create multiple tabs for different languages and get the code to display it.

So my question is: Is their an if then statement in javascript that I can use to help detect the language of the browser and display the correct tab? Or is their a better way of doing this? Since my localized domains format is "ru.domain.com" I could even have the if then statement check for the language code in the current page url. Any help would be appreciated.

Community
  • 1
  • 1
user1632018
  • 2,485
  • 10
  • 52
  • 87
  • 4
    I believe the most popular paradigm is to let the user select which language they want to view the site in. – Shmiddty Nov 27 '12 at 21:16
  • 2
    Take a look at this answer instead http://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference – Mel Nicholson Nov 27 '12 at 21:20
  • Check this out http://stackoverflow.com/questions/8601837/how-to-detect-users-language-the-simple-way – user1759671 Nov 27 '12 at 21:31

0 Answers0