You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
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.
This commit is contained in:
@@ -336,6 +336,10 @@ export function getLanguagesFromBrowser() {
|
|||||||
return [navigator.userLanguage || "en"];
|
return [navigator.userLanguage || "en"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getLanguageFromBrowser() {
|
||||||
|
return getLanguagesFromBrowser()[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns a language string, normalises it,
|
* Turns a language string, normalises it,
|
||||||
* (see normalizeLanguageKey) into an array of language strings
|
* (see normalizeLanguageKey) into an array of language strings
|
||||||
|
|||||||
Reference in New Issue
Block a user