mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
38 lines
821 B
TypeScript
38 lines
821 B
TypeScript
import * as i18n from 'i18next'
|
|
import * as LanguageDetector from 'i18next-browser-languagedetector'
|
|
|
|
const options = {
|
|
fallbackLng: 'en',
|
|
|
|
ns: ['slidebar'],
|
|
resources: {
|
|
en: {
|
|
slidebar: {
|
|
Proxies: 'Proxies',
|
|
Overview: 'Overview',
|
|
Logs: 'Logs',
|
|
Rules: 'Rules',
|
|
Settings: 'Setting'
|
|
}
|
|
},
|
|
'zh-CN': {
|
|
slidebar: {
|
|
Proxies: '代理',
|
|
Overview: '总览',
|
|
Logs: '日志',
|
|
Rules: '规则',
|
|
Settings: '设置'
|
|
}
|
|
}
|
|
},
|
|
react: {
|
|
wait: true
|
|
}
|
|
}
|
|
|
|
export interface I18nProps {
|
|
t? (key: string): string
|
|
}
|
|
|
|
export default i18n.use(LanguageDetector).init(options)
|