At the time of this writing, Go does not yet have support for internationalized locales for dates, if you create a month.yaml in your data/ folder with a content like shown below. It will work. 1: "janvier" 2: "février" 3: "mars" 4: "avril" 5: "mai" 6: "juin" 7: "juillet" 8: "août" 9: "septembre" 10: "octobre" 11: "novembre" 12: "décembre"pull/3/head
* Disqus comments | * Disqus comments | ||||
* RSS feeds | * RSS feeds | ||||
* Custom CSS/JS | * Custom CSS/JS | ||||
* Multilingual months support | |||||
## Installation | ## Installation | ||||
This is some static page where you can write about yourself. | This is some static page where you can write about yourself. | ||||
``` | ``` | ||||
## Language Settings for the month | |||||
Due to the currently unavailable feature for multilingual dates in ``.Date`` from | |||||
Go. It is possible to create a ``month.yaml`` in the data folder of your | |||||
Hugo site root directoy. There is also an example file in | |||||
``exampleSite/data/``. | |||||
```sh | |||||
cat > month.yaml << EOF | |||||
1: "Jan" | |||||
2: "Feb" | |||||
3: "Mar" | |||||
4: "Apr" | |||||
5: "May" | |||||
6: "Jun" | |||||
7: "Jul" | |||||
8: "Aug" | |||||
9: "Sep" | |||||
10: "Oct" | |||||
11: "Nov" | |||||
12: "Dec" | |||||
EOF | |||||
``` | |||||
## Credits | ## Credits | ||||
* [Ezhil theme](https://github.com/vividvilla/ezhil) from which Ink was forked | * [Ezhil theme](https://github.com/vividvilla/ezhil) from which Ink was forked |
1: "Jan" | |||||
2: "Feb" | |||||
3: "Mar" | |||||
4: "Apr" | |||||
5: "May" | |||||
6: "Jun" | |||||
7: "Jul" | |||||
8: "Aug" | |||||
9: "Sep" | |||||
10: "Oct" | |||||
11: "Nov" | |||||
12: "Dec" |
<div class="meta"> | <div class="meta"> | ||||
<div class="date"> | <div class="date"> | ||||
<span class="day">{{ dateFormat "02" .Date }}</span> | <span class="day">{{ dateFormat "02" .Date }}</span> | ||||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="matter"> | <div class="matter"> |
<div class="meta"> | <div class="meta"> | ||||
<div class="date"> | <div class="date"> | ||||
<span class="day">{{ dateFormat "02" .Date }}</span> | <span class="day">{{ dateFormat "02" .Date }}</span> | ||||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{ end }} | {{ end }} |
<div class="meta"> | <div class="meta"> | ||||
<div class="date"> | <div class="date"> | ||||
<span class="day">{{ dateFormat "02" .Date }}</span> | <span class="day">{{ dateFormat "02" .Date }}</span> | ||||
<span class="rest">{{ dateFormat "Jan 2006" .Date }}</span> | |||||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="matter"> | <div class="matter"> |