支持多语言英文

This commit is contained in:
whyour
2023-07-29 18:26:30 +08:00
parent 39bfd39559
commit e7d023a7e0
68 changed files with 2186 additions and 982 deletions
+15
View File
@@ -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 {