ref: faa64abdc2d0d676bf59bba5d3aa1b5683b0a57b
parent: e6f2426ef090e3c8a90f18275d1df3da82abb813
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Oct 12 13:04:50 EDT 2016
docs: Add singular/plural i18n example
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -139,7 +139,19 @@
- 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