mirror of
https://github.com/wassname/talk.git
synced 2026-07-31 12:50:48 +08:00
[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:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user