2

Is there anyway by which we can get the IE browser language

I tried navigator.lanuage , navigator.userLanguage etc...nothing works :( .

gen_Eric
  • 223,194
  • 41
  • 299
  • 337

1 Answers1

1

You probably are looking for Accept-Language

The Accept-Language request-header field is similar to Accept, but restricts the set of natural languages that are preferred as a response to the request.

An example could be like this:

$.ajax({ 
    url: "http://abcd.com", 
    dataType: 'jsonp', 
    success: function(headers) {
        language = headers['Accept-Language'];
       //..........
    }
});

Also check How to getting browser current locale preference using javascript?

Community
  • 1
  • 1
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331