Skip to content

Instantly share code, notes, and snippets.

@cubehrends
Created November 20, 2021 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cubehrends/bc200bddfecee7da5dc2a90b578163f8 to your computer and use it in GitHub Desktop.
Save cubehrends/bc200bddfecee7da5dc2a90b578163f8 to your computer and use it in GitHub Desktop.
Replacing English month names with German ones in a Twig missing The Intl Extension
{% set d = ( post.date | date( 'j. F Y' ) ) %}
<p>
{{ d | replace({
'January': 'Januar',
'February': 'Februar',
'March': 'März',
'May': 'Mai',
'June': 'Juni',
'July': 'Juli',
'October': 'Oktober',
'December': 'Dezember'
}) }}
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment