Skip to content

Commit 5055c9b

Browse files
xupeaxupea
authored and
xupea
committed
feat: support zh-Hans
1 parent 96380af commit 5055c9b

File tree

119 files changed

+12672
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+12672
-62
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ lib/core/MetadataBlog.js
88

99
translated_docs
1010
build/
11-
i18n/*
1211
.docusaurus
1312
.cache-loader
1413

docusaurus.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ module.exports = {
215215
remarkPlugins: [
216216
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
217217
],
218+
editLocalizedFiles: true,
218219
editUrl:
219220
'https://github.com/testing-library/testing-library-docs/edit/main/',
220221
path: './docs',
@@ -263,6 +264,10 @@ module.exports = {
263264
label: 'Examples',
264265
position: 'left',
265266
},
267+
{
268+
type: 'localeDropdown',
269+
position: 'right',
270+
},
266271
{
267272
to: '/help',
268273
label: 'Help',
@@ -356,4 +361,8 @@ module.exports = {
356361
indexName: 'testing-library',
357362
},
358363
},
364+
i18n: {
365+
defaultLocale: 'en',
366+
locales: ['en', 'zh-Hans']
367+
}
359368
}

0 commit comments

Comments
 (0)