-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(date-time-picker): date-time-picker 组件支持国际化 (#2464)
* feat(datetimepicker): date-picker DateTimePicker 组件支持国际化 re #2367 * fix(date-time-picker): 修复代码冗余问题 * Update README.md * Update README.md --------- Co-authored-by: Y <[email protected]>
- Loading branch information
Showing
9 changed files
with
181 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// dayjs 语言包 | ||
import enLocale from 'dayjs/locale/en'; | ||
import zhLocale from 'dayjs/locale/zh-cn'; | ||
import tcLocale from 'dayjs/locale/zh-tw'; // 繁体 | ||
import koLocale from 'dayjs/locale/ko'; // 韩语 | ||
import jaLocale from 'dayjs/locale/ja'; // 日语 | ||
import ruLocale from 'dayjs/locale/ru'; // 俄语 | ||
|
||
// 本地语言包 | ||
import en from './en'; | ||
import zh from './zh'; | ||
import tc from './tc'; | ||
import ko from './ko'; | ||
import ja from './ja'; | ||
import ru from './ru'; | ||
|
||
export default { | ||
default: { | ||
key: 'zh-cn', | ||
label: '简体中文', | ||
locale: zhLocale, | ||
i18n: zh, | ||
}, | ||
en: { | ||
key: 'en', | ||
label: 'English', | ||
locale: enLocale, | ||
i18n: en, | ||
}, | ||
'zh-cn': { | ||
key: 'zh-cn', | ||
label: '简体中文', | ||
locale: zhLocale, | ||
i18n: zh, | ||
}, | ||
// 容错处理 | ||
zh: { | ||
key: 'zh-cn', | ||
label: '简体中文', | ||
locale: zhLocale, | ||
i18n: zh, | ||
}, | ||
'zh-tw': { | ||
key: 'zh-tw', | ||
label: '繁体中文', | ||
locale: tcLocale, | ||
i18n: tc, | ||
}, | ||
// 容错处理 | ||
tc: { | ||
key: 'zh-tw', | ||
label: '繁体中文', | ||
locale: tcLocale, | ||
i18n: tc, | ||
}, | ||
ko: { | ||
key: 'ko', | ||
label: '한국어', | ||
locale: koLocale, | ||
i18n: ko, | ||
}, | ||
// 容错处理 | ||
kr: { | ||
key: 'ko', | ||
label: '한국어', | ||
locale: koLocale, | ||
i18n: ko, | ||
}, | ||
ja: { | ||
key: 'ja', | ||
label: '日本語', | ||
locale: jaLocale, | ||
i18n: ja, | ||
}, | ||
ru: { | ||
key: 'ru', | ||
label: 'русский', | ||
locale: ruLocale, | ||
i18n: ru, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default { | ||
year: '年', | ||
month: '月', | ||
date: '日', | ||
hour: '時', | ||
minute: '分', | ||
second: '秒', | ||
am: '午前', | ||
pm: '午後', | ||
confirm: '確認', | ||
cancel: 'キャンセル', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default { | ||
year: '년', | ||
month: '월', | ||
date: '일', | ||
hour: '시', | ||
minute: '분', | ||
second: '초', | ||
am: '오전', | ||
pm: '오후', | ||
confirm: '확인', | ||
cancel: '취소', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default { | ||
year: '', | ||
month: '', | ||
date: '', | ||
hour: '', | ||
minute: '', | ||
second: '', | ||
am: 'до полудня', | ||
pm: 'после полудня', | ||
confirm: 'подтвердить', | ||
cancel: 'отменить', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default { | ||
year: '年', | ||
month: '月', | ||
date: '日', | ||
hour: '時', | ||
minute: '分', | ||
second: '秒', | ||
am: '上午', | ||
pm: '下午', | ||
confirm: '確定', | ||
cancel: '取消', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters