mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 04:02:56 +08:00
支持多语言英文
This commit is contained in:
+15
@@ -1,4 +1,19 @@
|
||||
const baseUrl = window.__ENV__QlBaseUrl || '/';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export function rootContainer(container: any) {
|
||||
const locales = {
|
||||
'en-US': require('./locales/en-US.json'),
|
||||
'zh-CN': require('./locales/zh-CN.json'),
|
||||
};
|
||||
let currentLocale = intl.determineLocale({
|
||||
urlLocaleKey: 'lang',
|
||||
cookieLocaleKey: 'lang',
|
||||
});
|
||||
|
||||
intl.init({ currentLocale, locales });
|
||||
return container;
|
||||
}
|
||||
|
||||
export function modifyClientRenderOpts(memo: any) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user