Merge pull request #3769 from matrix-org/travis/babel7-wp-lang-dropdown
Define getLanguageFromBrowser() for LanguageDropdown
This commit is contained in:
commit
58f169be92
1 changed files with 4 additions and 0 deletions
|
@ -336,6 +336,10 @@ export function getLanguagesFromBrowser() {
|
|||
return [navigator.userLanguage || "en"];
|
||||
}
|
||||
|
||||
export function getLanguageFromBrowser() {
|
||||
return getLanguagesFromBrowser()[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns a language string, normalises it,
|
||||
* (see normalizeLanguageKey) into an array of language strings
|
||||
|
|
Loading…
Reference in a new issue