Skip to content

Commit

Permalink
Update i18n.ts
Browse files Browse the repository at this point in the history
Upadte: Add Vietnamese language i18n file!
  • Loading branch information
vuong2023 authored Dec 27, 2023
1 parent d939e4a commit c5c7dae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/misc/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const allLocales = {
zh_cn: import('~/i18n/zh-cn'),
zh_tw: import('~/i18n/zh-tw'),
en: import('~/i18n/en'),
vi: import('~/i18n/vi'),
};

type BackendRequestCallback = (err: null, result: { status: number; data: any }) => void;
Expand Down Expand Up @@ -39,6 +40,9 @@ i18next
case '/__en/translation.json':
p = allLocales.en;
break;
case '/__vi/translation.json':
p = allLocales.vi;
break;
default:
p = allLocales.zh_cn;
break;
Expand All @@ -51,7 +55,7 @@ i18next
}
},
},
supportedLngs: ['zh-CN', 'zh-TW', 'en'],
supportedLngs: ['zh-CN', 'zh-TW', 'en', 'vi'],
load: 'currentOnly',
fallbackLng: 'en',
interpolation: {
Expand Down

0 comments on commit c5c7dae

Please sign in to comment.