| 6:43 am on Jan 9, 2003 (gmt 0)|
You may find this thread [webmasterworld.com] of interest. The consensus there seems to be that auto-detection of language is not a good idea in many cases. You can read the comments in the thread and judge for your self how they apply to your situation.
As to a script, I found this snippet tucked away (had to blow the dust off it!) It purports to do what you asked - that is, check for what "prefered language" was chosen in the browser setup. But I've never used it and can't vouch that it's dependable. In particular, it is an old script so I'm not sure that these are the current names for the object you need to check in more recent browsers.
if (navigator.appName == 'Netscape')
var language = navigator.language;
var language = navigator.browserLanguage;
[edited by: tedster at 7:22 am (utc) on Jan. 9, 2003]
| 6:44 am on Jan 9, 2003 (gmt 0)|
each user can setup his browser, sothat the browser can tell the server which language is prefered. apache has this feature build in for example. in this case you only need to add the countrycode at the end of the document, if it's index.html for example, you name it index.html.fr for french, index.html.de for german etc. pp.
if you're using apache, take a look into the docs.
| 12:00 pm on Jan 10, 2003 (gmt 0)|
problem is: how many are aware that they can set their browser up so that the server gets information about the preferred language?
I've looked into the Apache automatic detection and found it wanting in everyday practical life. It's a great feature, *IF* users did select the language preference in their browsers - otherwise its problematic.
you can do the Apache serverside identification, but for safety's sake do also still offer the manual selection.
| 12:44 pm on Jan 10, 2003 (gmt 0)|
See section 14.4 Accept-Language of RFC2616 [faqs.org].
| 1:17 pm on Jan 10, 2003 (gmt 0)|
What would happen if a user's browser was set for several languages?
Just curious to know.