How can I change the default language in Jekyll? I would like, to have German names for the days using the {{ … | date "%A" }} filter.
From Jekyll Date Formatting Examples by Alan Smith
<!-- Whitespace added for readability -->
{% assign m = include.date | date: "%-m" %}
{{ include.date | date: "%-d" }}
{% case m %}
{% when '1' %}Januar
{% when '2' %}Februar
{% when '3' %}März
{% when '4' %}April
{% when '5' %}Mai
{% when '6' %}Juni
{% when '7' %}Juli
{% when '8' %}August
{% when '9' %}September
{% when '10' %}Oktober
{% when '11' %}November
{% when '12' %}Dezember
{% endcase %}
{{ include.date | date: "%Y" }}
Now instead of page.date or post.date you can call this include and pass it date as an argument.
{% include date-ge.html date=page.date %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With