for example in ie we can use "navigator.systemLanguage" to get language setting but how to get language setting in firefox way?
thx your response.
Cloud
for example in ie we can use "navigator.systemLanguage" to get language setting but how to get language setting in firefox way?
thx your response.
Cloud
The following JavaScript will get you all the properties of the navigator object that you can look at:
document.write('<pre>');
for (var i in navigator)
{
document.writeln('navigator.' + i + ' = ' + navigator[i]);
}
document.write('</pre>');
My Firefox has this attribute:
navigator.language = en-US
... which should suit your needs.
Wow BipdelShark was fast! Here is a solution that I use to deal with most browsers:
<script type="text/javascript">
var language = navigator.userLanguage || navigator.language;
alert(language);
</script>
Sorry if I'm being dense, but I just went into firefox's Options->Content and removed all languages except German/Germany, and navigator.language hasn't changed - it's still en-GB (I'm in the UK).
I'm told if I get the German INSTALL of firefox it will work, but I shouldn't need to do that, right?
The useragent string still contains en-UK, too; but the accept-language on HTTP headers IS set correctly. Anyone know how to get to the correct setting?