feat: core components support simple locale switching (#4273)
* feat: core components support simple locale switching * fix: test error * fix: test error
This commit is contained in:
14
packages/@core/composables/src/use-simple-locale/messages.ts
Normal file
14
packages/@core/composables/src/use-simple-locale/messages.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export type Locale = 'en-US' | 'zh-CN';
|
||||
|
||||
export const messages: Record<Locale, Record<string, string>> = {
|
||||
'en-US': {
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Confirm',
|
||||
},
|
||||
'zh-CN': {
|
||||
cancel: '取消',
|
||||
confirm: '确认',
|
||||
},
|
||||
};
|
||||
|
||||
export const getMessages = (locale: Locale) => messages[locale];
|
Reference in New Issue
Block a user