feat: 补充语言列表

This commit is contained in:
ChenZhaoYu 2023-04-26 08:26:50 +08:00
parent dd20e9aea6
commit 3b033d0ed4
6 changed files with 8 additions and 4 deletions

View File

@ -58,6 +58,7 @@ const languageOptions: { label: string; key: Language; value: Language }[] = [
{ label: '繁體中文', key: 'zh-TW', value: 'zh-TW' }, { label: '繁體中文', key: 'zh-TW', value: 'zh-TW' },
{ label: 'English', key: 'en-US', value: 'en-US' }, { label: 'English', key: 'en-US', value: 'en-US' },
{ label: '한국어', key: 'ko-KR', value: 'ko-KR' }, { label: '한국어', key: 'ko-KR', value: 'ko-KR' },
{ label: 'Русский язык', key: 'ru-RU', value: 'ru-RU' },
] ]
function updateUserInfo(options: Partial<UserInfo>) { function updateUserInfo(options: Partial<UserInfo>) {

View File

@ -11,6 +11,9 @@ export function useLanguage() {
case 'en-US': case 'en-US':
setLocale('en-US') setLocale('en-US')
return enUS return enUS
case 'ru-RU':
setLocale('ru-RU')
return enUS
case 'ko-KR': case 'ko-KR':
setLocale('ko-KR') setLocale('ko-KR')
return koKR return koKR

View File

@ -4,7 +4,7 @@ const LOCAL_NAME = 'appSetting'
export type Theme = 'light' | 'dark' | 'auto' export type Theme = 'light' | 'dark' | 'auto'
export type Language = 'zh-CN' | 'zh-TW' | 'en-US' | 'ko-KR' export type Language = 'zh-CN' | 'zh-TW' | 'en-US' | 'ko-KR' | 'ru-RU'
export interface AppState { export interface AppState {
siderCollapsed: boolean siderCollapsed: boolean