mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
- Set VitePress base to '/docs/' for serving documentation at /docs/ route - Update favicon path in head config to '/docs/favicon.ico' - Add build:site script to build website and docs, then merge outputs
23 lines
473 B
TypeScript
23 lines
473 B
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
|
|
import en from './locales/en.json';
|
|
import zh from './locales/zh.json';
|
|
|
|
i18n
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
resources: {
|
|
en: { translation: en },
|
|
zh: { translation: zh },
|
|
},
|
|
fallbackLng: 'en',
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
|
|
export default i18n;
|