Jump to content

Help:bilingual Site Language Auto Detect And Direct


franceav

Recommended Posts

So I have a site which has 2 languages English and Chinese, how could I direct the front page according different user language, I think this could be done by using browser language detection and window.onload to direct but can't writethe actual code, please help and any useful sources are welcomed as well, thanks in advance!!

Link to comment
Share on other sites

Javascript is limited in what it can do with the language, something like this should work at least for IE:http://javascript.about.com/library/bllang.htmIt would be a better solution if you could use a server-side language like PHP which will have access to the headers that the browser sent, including the accept-language header.

Link to comment
Share on other sites

Javascript is limited in what it can do with the language, something like this should work at least for IE:http://javascript.about.com/library/bllang.htmIt would be a better solution if you could use a server-side language like PHP which will have access to the headers that the browser sent, including the accept-language header.
thanks, very helpful, I think to use php is easier and my pages are running in a php server, but still i don'tknow how to do with it, can you or someone give me some of the sample code for making this happen!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...