[CORL-406] Tenant Locale Selection (#2450)

* feat: added preload config

* feat: support changing locale

* fix: name case

* fix: removed unused code

* feat: added translations for default reactions

* fix: do not translate icon

* fix: shorter i18n keys
This commit is contained in:
Wyatt Johnson
2019-09-05 17:02:06 +00:00
committed by GitHub
parent 5bf4f22931
commit 04c56b3fb5
54 changed files with 673 additions and 207 deletions
+16 -8
View File
@@ -4,15 +4,23 @@
*/
export type LanguageCode = "en-US" | "pt-BR" | "es" | "de" | "nl-NL" | "da";
/**
* LOCALES_MAP contains a map of language codes associated with their
* name in native language.
*/
export const LOCALES_MAP: Record<LanguageCode, string> = {
"en-US": "English",
"pt-BR": "Português brasileiro",
es: "Español",
de: "Deutsch",
"nl-NL": "Nederlands",
da: "Dansk",
};
/**
* LOCALES is an array of supported language codes that can be accessed as a
* value.
*/
export const LOCALES: LanguageCode[] = [
"en-US",
"pt-BR",
"es",
"de",
"nl-NL",
"da",
];
export const LOCALES: LanguageCode[] = Object.keys(
LOCALES_MAP
) as LanguageCode[];