javascript - How do you get the language Microsoft Edge is using? -
when user lands on site, i'd language code corresponding language they're using. (e.g, "en-us" english, "fr-ca" french canadian.) have culture/language dependant features. (among other things, there's french translation of site in works.) have central place store language code, , have works in chrome , firefox using navigator.language, internet explorer using navigator.browserlanguage. need way information user in microsoft edge.
i'm using javascript, angularjs, , kendo if 1 of has useful tool. mildly prefer pure javascript answer, , prefer entirely in frontend.
note: it's possible navigator.language in edge. returns "en-us" me , in us, i'm using testing environment should set it's uk. confirmation navigator.language user language , environment leaky counts answer, if includes edge gets information can fix environment , test it.
Comments
Post a Comment