You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
194 B
TypeScript
14 lines
194 B
TypeScript
|
5 months ago
|
import zh from '../locale/zh-Hans'
|
||
|
|
const messages = {
|
||
|
|
zh,
|
||
|
|
}
|
||
|
|
const localeMap = {
|
||
|
|
'zh-Hans': 'zh',
|
||
|
|
'zh-Hant': 'zh',
|
||
|
|
}
|
||
|
|
|
||
|
|
export const t = (key: string) => {
|
||
|
|
// @ts-ignore
|
||
|
|
return zh[key]
|
||
|
|
}
|