Jump to content

Detecting browsers language settings?


N1CK3RS0N

Recommended Posts

if (typeof(navigator.language) != "undefined")
document.writeln(navigator.language);
else if (typeof(navigator.browserLanguage) != "undefined")
document.writeln(navigator.browserLanguage);

if (typeof(navigator.systemLanguage) == "string")
document.writeln($("<div/>").text(navigator.systemLanguage).html());

if (typeof(navigator.userLanguage) == "string")
document.writeln($("<div/>").text(navigator.userLanguage).html());

if (typeof(navigator.browserLanguage) == "string")
document.writeln($("<div/>").text(navigator.browserLanguage).html());

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.