Closed LeMoussel closed 4 years ago
Thanks for the issue @LeMoussel . I would rather not add a new dependency of that plugin for the theme, might there be another way to support multi-language date display? In the meantime it's great to see you were able to get a solution going for the issue yourself!
I am closing this for now, hope your custom Twig works well for you!
By default, dates are not translated in Grav, which is a concern for internationalization.
One way to get dates localized would be to use the Twig extensions plugin that will localize dates : https://github.com/Perlkonig/grav-plugin-twig-extensions. The filter
localizeddate('long', 'short', html_lang)
does the job to get a localized datetime format.I setup a test site with a
date.html.twig
:For french I Got this:
This could be integrated by default in this theme