feat(lang): add Simplified Chinese display language (#2032)

This commit is contained in:
TheCatLady
2021-09-04 01:12:41 -04:00
committed by GitHub
parent fe89fd5f12
commit 590ea7e404
2 changed files with 7 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ export type AvailableLocale =
| 'ru' | 'ru'
| 'sr' | 'sr'
| 'sv' | 'sv'
| 'zh-CN'
| 'zh-TW'; | 'zh-TW';
type AvailableLanguageObject = Record< type AvailableLanguageObject = Record<
@@ -93,6 +94,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'zh-TW', code: 'zh-TW',
display: '‪繁體中文‬', display: '‪繁體中文‬',
}, },
'zh-CN': {
code: 'zh-CN',
display: '‪简体中文‬',
},
}; };
export interface LanguageContextProps { export interface LanguageContextProps {

View File

@@ -53,6 +53,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/sr.json'); return import('../i18n/locale/sr.json');
case 'sv': case 'sv':
return import('../i18n/locale/sv.json'); return import('../i18n/locale/sv.json');
case 'zh-CN':
return import('../i18n/locale/zh_Hans.json');
case 'zh-TW': case 'zh-TW':
return import('../i18n/locale/zh_Hant.json'); return import('../i18n/locale/zh_Hant.json');
default: default: