Define getLanguageFromBrowser() for LanguageDropdown

Without it we can't compile, so we should define it. It looks like it's never been defined, and LanguageDropdown seems to use it as a last resort - it should be safe to land.
pull/21833/head
Travis Ralston 2019-12-19 18:29:22 -07:00
parent 38e75aaae0
commit cfa21cbb8c
1 changed files with 4 additions and 0 deletions

View File

@ -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