The task is to determine the user language set in the browser that has the highest priority.
We have:
var userLang = navigator.language || navigator.userLanguage; In Opera, Chrome determines the language correctly and determines the first one in the list. IE / Edge defines a language that is set to "regional features", i.e. it makes no difference what language priorities were set along the path "Control Panel \ All Control Panel Items \ Language". (OS Windows 10).
The definition is needed in order to properly highlight the current language of the web application when you first visit, then it is done on the basis of cookie data. Is it possible to resolve the issue?