Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMitchell Cohen <mitch.cohen@me.com>2016-09-20 12:11:57 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-20 12:11:57 +0300
commite7e2a1ca023073022ce9a4f694253d5592d5c104 (patch)
treeda10923bce6847f28e524f21703e33c04bdba70e /docs
parente7ff5c2d6a83c245217a50f085e69ddad6c24618 (diff)
tpl: Improve tests and docs for i18n
Diffstat (limited to 'docs')
-rw-r--r--docs/content/content/multilingual.md11
-rw-r--r--docs/content/overview/configuration.md2
2 files changed, 6 insertions, 7 deletions
diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md
index 86da75409..d3f69f2e6 100644
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -86,7 +86,7 @@ slowly start to translate your current content without having to rename everythi
If left unspecified, the value for `DefaultContentLanguage` defaults to `en`.
-By having the same _base file name_, the content pieces are linked together as translated pieces.
+By having the same _base file name_, the content pieces are linked together as translated pieces.
### Link to translated content
@@ -190,17 +190,16 @@ The rendering of the main navigation works as usual. `.Site.Menus` will just con
```
-An empty string will be shown if the translation for the current language is missing and no default value is set.
+### Missing translations
-While translating a Hugo website it can be handy to have a visual indicator as well. The `EnableMissingTranslationPlaceholders` config option allows you to replace the empty string with a placeholder like `[i18n] identifier`, where `identifier` is the id of the missing translation.
+If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
-**Remember: Hugo will generate your website with these placeholders. It might not be suited for production environments.**
+While translating a Hugo site, it can be handy to have a visual indicator of missing translations. The `EnableMissingTranslationPlaceholders` config option will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
+**Remember: Hugo will generate your website with these placeholders. It might not be suited for production environments.**
### Multilingual Themes support
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there are more than one language, URLs must either come from the built-in `.Permalink` or `.URL`, be constructed with `relLangURL` or `absLangURL` template funcs -- or prefixed with `{{.LanguagePrefix }}`.
If there are more than one language defined, the`LanguagePrefix` variable will equal `"/en"` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string, so it is harmless for single-language sites.
-
-
diff --git a/docs/content/overview/configuration.md b/docs/content/overview/configuration.md
index 259d9acfb..4ba00664d 100644
--- a/docs/content/overview/configuration.md
+++ b/docs/content/overview/configuration.md
@@ -135,7 +135,7 @@ along with their current, default values:
# Enable Emoji emoticons support for page content.
# See www.emoji-cheat-sheet.com
enableEmoji: false
- # Show a placeholder like "[i18n] foo" instead of an empty string if a translation is missing
+ # Show a placeholder instead of the default value or an empty string if a translation is missing
enableMissingTranslationPlaceholders: false
footnoteAnchorPrefix: ""
footnoteReturnLinkContents: ""