Feat: Add LanguageAbbreviation to simplify language resource files. #5065 (#5072)

### What problem does this PR solve?

Feat: Add LanguageAbbreviation to simplify language resource files.
#5065

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-18 15:06:53 +08:00
committed by GitHub
parent 00c7ddbc9b
commit a2b8ba472f
4 changed files with 58 additions and 40 deletions

View File

@ -61,6 +61,28 @@ export const LanguageMap = {
'Portuguese BR': 'Português BR',
};
export enum LanguageAbbreviation {
En = 'en',
Zh = 'zh',
ZhTraditional = 'zh-TRADITIONAL',
Id = 'id',
Ja = 'ja',
Es = 'es',
Vi = 'vi',
PtBr = 'pt-BR',
}
export const LanguageAbbreviationMap = {
[LanguageAbbreviation.En]: 'English',
[LanguageAbbreviation.Zh]: '简体中文',
[LanguageAbbreviation.ZhTraditional]: '繁體中文',
[LanguageAbbreviation.Id]: 'Indonesia',
[LanguageAbbreviation.Es]: 'Español',
[LanguageAbbreviation.Vi]: 'Tiếng việt',
[LanguageAbbreviation.Ja]: '日本語',
[LanguageAbbreviation.PtBr]: 'Português BR',
};
export const LanguageTranslationMap = {
English: 'en',
Chinese: 'zh',