Skip to content

Commit

Permalink
feat: chinese language
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Jan 20, 2024
1 parent 4e17e37 commit 4557a16
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Supported types:
Supported Languages:
* 🇬🇧 **English** - `en`
* 🇷🇺 **Russian** - `ru`
* 🇨🇳 **Chinese** - `zh`

If you haven't found your language, it can easily be added! Use the instructions in the section [contributing](https://mafl.hywax.space/community/contributing.html) on docs.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Set the desired language with:
lang: ru
```

Values: `en`, `ru`
Values: `en`, `ru`, `zh`

Default: `en`

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ title: Моя домашняя страница
lang: ru
```

Поддерживаемые значения: `en`, `ru`
Поддерживаемые значения: `en`, `ru`, `zh`

Значение по умолчанию: `en`

Expand Down
17 changes: 17 additions & 0 deletions locales/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"service": {

},

"error": {
"title": "谬误",
"page404": "页面未找到!",
"description": "哎呀!出现意外错误",
"action": "转到文档"
},

"update": {
"message": "新版本问世",
"visit": "访问 github →"
}
}
6 changes: 6 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export default defineNuxtConfig({
name: 'Русский',
file: 'ru-RU.json',
},
{
code: 'zh',
iso: 'zh-CN',
name: '中文',
file: 'zh-CN.json',
},
],
strategy: 'no_prefix',
langDir: 'locales',
Expand Down

0 comments on commit 4557a16

Please sign in to comment.