mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
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