feat(i18n): add support for Portuguese (Brazil) language (pt_br) (#34)

* feat(i18n): add support for Portuguese (Brazil) language (pt_br)
This commit is contained in:
Adriel Bento
2023-03-21 04:09:48 -03:00
committed by GitHub
parent 0f48cc616e
commit fef8027959
3 changed files with 31 additions and 1 deletions
+6 -1
View File
@@ -6,6 +6,7 @@ import ko from '../i18n/ko.json' assert { type: 'json' };
import zh_CN from '../i18n/zh_CN.json' assert { type: 'json' };
import zh_TW from '../i18n/zh_TW.json' assert { type: 'json' };
import ja from '../i18n/ja.json' assert { type: 'json' };
import pt_br from '../i18n/pt_br.json' assert { type: 'json' };
export enum I18nLocals {
'en' = 'en',
@@ -15,7 +16,8 @@ export enum I18nLocals {
'de' = 'de',
'fr' = 'fr',
'it' = 'it',
'ko' = 'ko'
'ko' = 'ko',
'pt_br' = 'pt_br'
};
export const i18n = {
@@ -27,6 +29,7 @@ export const i18n = {
fr,
it,
ko,
pt_br
};
export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = {
@@ -37,6 +40,8 @@ export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = {
de: ['de', 'German' ,'Deutsch'],
fr: ['fr', 'French', 'française'],
it: ['it', 'Italian', 'italiano'],
pt_br: ['pt_br', 'Portuguese', 'português'],
en: ['en', 'English', 'english'],
};
export function getI18nLocal(value: string): string | boolean {