hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit faa64abdc2d0d676bf59bba5d3aa1b5683b0a57b
parent e6f2426ef090e3c8a90f18275d1df3da82abb813
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed, 12 Oct 2016 17:04:50 +0200

docs: Add singular/plural i18n example

Diffstat:
Mdocs/content/content/multilingual.md | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md
@@ -139,7 +139,19 @@ This uses a definition like this one in `i18n/en-US.yaml`:
 - id: wordCount
   translation: "This article has {{ .WordCount }} words."
 ```
+An example of singular and plural form:
 
+```
+- id: readingTime
+  translation: 
+    one: "One minute read"
+    other: "{{.Count}} minutes read"
+```
+And then in the template:
+
+```
+{{ i18n "readingTime" .ReadingTime }}
+```
 To track down missing translation strings, run Hugo with the `--i18n-warnings` flag:
 
 ```bash