Created
September 18, 2012 13:09
-
-
Save patrickwelker/3743007 to your computer and use it in GitHub Desktop.
Localized date via replace in Jekyll (Example: German)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<time datetime="{{ post.date | %Y-%m-%d %H:%M+01:00 }}"> | |
{{ post.date | date: "%d. %B %Y" | replace:"January","Januar" | replace:"Februar","February" | replace:"March","März" | replace:"May","Mai" | replace:"June","Juni" | replace:"July","Juli" | replace:"December","Dezember" }} | |
</time> |
Oktober is missing, add:
replace:"October","Oktober"
Isn't there any possibility to change the language by default? Something like setlocale(LC_TIME, "de_DE");
in PHP ... Any suggestions?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you mixed up with february:
original:
corrected :
anyway +1 thanks