We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ec0680 commit a394a23Copy full SHA for a394a23
2 files changed
docusaurus.config.js
@@ -62,18 +62,8 @@ const config = {
62
],
63
64
i18n: {
65
- defaultLocale: 'zh-CN',
+ defaultLocale: 'zh',
66
locales: ['en', 'zh-CN'],
67
- localeConfigs: {
68
- 'zh-CN': {
69
- label: '简体中文',
70
- path: '' // 空字符串表示不需要路径前缀
71
- },
72
- en: {
73
- label: 'English',
74
- path: 'en' // 英文需要 /en/ 路径前缀
75
- }
76
77
},
78
themeConfig:
79
src/pages/index.js
@@ -30,7 +30,7 @@ function HomepageHeader() {
30
arrows: false,
31
};
32
const { i18n } = useDocusaurusContext();
33
- const isEnglish = i18n.currentLocale === 'en';
+ const isEnglish = i18n.currentLocale !== 'zh-CN';
34
return (
35
<div id='main'>
36
<Slider {...settings}>
0 commit comments