chore(i18n): update Polish and docs (#234)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
baseURL = "https://example.com"
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
# [en, zh-cn, fr, pl, ...] determines default content language
|
||||
# [en, zh-cn, fr, pl, ...] 设置默认的语言
|
||||
defaultContentLanguage = "en"
|
||||
# theme
|
||||
# 主题
|
||||
|
||||
@@ -633,23 +633,29 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s
|
||||
|
||||
## 4 Multilingual and i18n
|
||||
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode.
|
||||
|
||||
It provides:
|
||||
|
||||
* Translation strings for default values (**English**, **Chinese** and **French**). **Feel free to contribute!**
|
||||
* In-browser language switching
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
|
||||
|
||||

|
||||
|
||||
### 4.1 Basic Configuration
|
||||
### 4.1 Compatibility {#language-compatibility}
|
||||
|
||||
| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
|
||||
|:------------------ |:---------:|:---------------------:|:-----------------------:|:-----------------------:|
|
||||
| English | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| French | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
|
||||
| Polish | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
|
||||
|
||||
:(far fa-kiss-wink-heart): **Feel free to [contribute](https://github.com/dillonzq/LoveIt/pulls)!**
|
||||
|
||||
### 4.2 Basic Configuration
|
||||
|
||||
After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your [site configuration](#site-configuration).
|
||||
|
||||
For example with English, Chinese and French website:
|
||||
|
||||
```toml
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, pl, ...] determines default content language
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[languages]
|
||||
@@ -754,9 +760,9 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w
|
||||
Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too.
|
||||
{{< /admonition >}}
|
||||
|
||||
### 4.2 Overwrite Translation Strings
|
||||
### 4.3 Overwrite Translation Strings
|
||||
|
||||
Translations strings are used for common default values used in the theme. Translations are available in **English**, **Chinese** and **French**, but you may use another language or want to override default values.
|
||||
Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values.
|
||||
|
||||
To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`.
|
||||
|
||||
|
||||
@@ -638,23 +638,29 @@ In `config/css/_custom.scss`, you can add some css style code to customize the s
|
||||
|
||||
## 4 Multilingual and i18n
|
||||
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode.
|
||||
|
||||
It provides:
|
||||
|
||||
* Translation strings for default values (**English**, **Chinese** and **French**). **Feel free to contribute!**
|
||||
* In-browser language switching
|
||||
**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
|
||||
|
||||

|
||||
|
||||
### 4.1 Basic Configuration
|
||||
### 4.1 Compatibility {#language-compatibility}
|
||||
|
||||
| Language | Hugo Code | HTML `lang` Attribute | Theme Docs | Lunr.js Support |
|
||||
|:------------------ |:---------:|:---------------------:|:-----------------------:|:-----------------------:|
|
||||
| English | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| French | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
|
||||
| Polish | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
|
||||
|
||||
:(far fa-kiss-wink-heart): **Feel free to [contribute](https://github.com/dillonzq/LoveIt/pulls)!**
|
||||
|
||||
### 4.2 Basic Configuration
|
||||
|
||||
After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your [site configuration](#site-configuration).
|
||||
|
||||
For example with English, Chinese and French website:
|
||||
|
||||
```toml
|
||||
# [en, zh-cn, fr, ...] determines default content language
|
||||
# [en, zh-cn, fr, pl, ...] determines default content language
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[languages]
|
||||
@@ -759,9 +765,9 @@ Be aware that only translated pages are displayed in menu. It’s not replaced w
|
||||
Use [Front Matter parameter](https://gohugo.io/content-management/multilingual/#translate-your-content) to translate urls too.
|
||||
{{< /admonition >}}
|
||||
|
||||
### 4.2 Overwrite Translation Strings
|
||||
### 4.3 Overwrite Translation Strings
|
||||
|
||||
Translations strings are used for common default values used in the theme. Translations are available in **English**, **Chinese** and **French**, but you may use another language or want to override default values.
|
||||
Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values.
|
||||
|
||||
To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`.
|
||||
|
||||
|
||||
@@ -635,23 +635,29 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac
|
||||
|
||||
## 4 多语言和 i18n
|
||||
|
||||
**LoveIt** 主题完全兼容 Hugo 的多语言模式.
|
||||
|
||||
支持:
|
||||
|
||||
* 多种语言的翻译字符串 (**英语**, **中文**和**法语**). **欢迎贡献!**
|
||||
* 在浏览器内语言切换
|
||||
**LoveIt** 主题完全兼容 Hugo 的多语言模式, 并且支持在网页上切换语言.
|
||||
|
||||

|
||||
|
||||
### 4.1 基本配置
|
||||
### 4.1 兼容性 {#language-compatibility}
|
||||
|
||||
| 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | Lunr.js 支持 |
|
||||
|:---- |:----:|:----:|:----:|:----:|
|
||||
| 英语 | `en` | `en` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| 简体中文 | `zh-cn` | `zh-CN` | :(far fa-check-square): | :(far fa-check-square): |
|
||||
| 法语 | `fr` | `fr` | :(far fa-square): | :(far fa-check-square): |
|
||||
| 波兰语 | `pl` | `pl` | :(far fa-square): | :(far fa-square): |
|
||||
|
||||
:(far fa-kiss-wink-heart): **请自由地[贡献代码](https://github.com/dillonzq/LoveIt/pulls)!**
|
||||
|
||||
### 4.2 基本配置
|
||||
|
||||
学习了 [Hugo如何处理多语言网站](https://gohugo.io/content-management/multilingual) 之后, 请在 [站点配置](#site-configuration) 中定义你的网站语言.
|
||||
|
||||
例如, 一个支持英语, 中文和法语的网站配置:
|
||||
|
||||
```toml
|
||||
# [en, zh-cn, fr, ...] 设置默认的语言
|
||||
# [en, zh-cn, fr, pl, ...] 设置默认的语言
|
||||
defaultContentLanguage = "zh-cn"
|
||||
|
||||
[languages]
|
||||
@@ -756,12 +762,12 @@ defaultContentLanguage = "zh-cn"
|
||||
也可以使用 [文章前置参数](https://gohugo.io/content-management/multilingual/#translate-your-content) 来翻译网址.
|
||||
{{< /admonition >}}
|
||||
|
||||
### 4.2 修改默认的翻译字符串
|
||||
### 4.3 修改默认的翻译字符串
|
||||
|
||||
翻译字符串用于在主题中使用的常见默认值.
|
||||
目前提供**英语**, **中文**和**法语**翻译, 但你可能自定义其他语言或覆盖默认值.
|
||||
目前提供[一些语言](#language-compatibility)的翻译, 但你可能自定义其他语言或覆盖默认值.
|
||||
|
||||
要覆盖默认值, 请在项目的 i18n 目录 `i18n/<languageCode>.toml` 中创建一个新文件,并从 `themes/LoveIt/i18n/en.toml` 中获得提示.
|
||||
要覆盖默认值, 请在你项目的 i18n 目录 `i18n/<languageCode>.toml` 中创建一个新文件,并从 `themes/LoveIt/i18n/en.toml` 中获得提示.
|
||||
|
||||
另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 [创建一个 PR](https://github.com/dillonzq/LoveIt/pulls) 来贡献主题翻译, 谢谢!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user