Remove use of navigator.userLanguage for IE11
Since MediaWiki 1.41 the Internet Explorer 11 has only Basic support: https://www.mediawiki.org/wiki/Compatibility#Desktop Change-Id: I4f4fb6532b0fe7aab9a3cb787deb4731d899bb53
This commit is contained in:
@@ -181,10 +181,9 @@
|
|||||||
*/
|
*/
|
||||||
mw.uls.getBrowserLanguage = function () {
|
mw.uls.getBrowserLanguage = function () {
|
||||||
// language is the standard property.
|
// language is the standard property.
|
||||||
// userLanguage is only for IE and returns system locale.
|
|
||||||
// Empty string is a fallback in case both are undefined
|
// Empty string is a fallback in case both are undefined
|
||||||
// to avoid runtime error with split().
|
// to avoid runtime error with split().
|
||||||
return ( window.navigator.language || window.navigator.userLanguage || '' ).split( '-' )[ 0 ];
|
return ( window.navigator.language || '' ).split( '-' )[ 0 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
mw.uls.getCountryCode = function () {
|
mw.uls.getCountryCode = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user