diff --git a/templates/_partials/fields/date.html.twig b/templates/_partials/fields/date.html.twig index c363f95c8..b77cdd758 100644 --- a/templates/_partials/fields/date.html.twig +++ b/templates/_partials/fields/date.html.twig @@ -24,13 +24,18 @@ {% endif %} {% if not valueonly %} + {# Ensure we use only locales bundled with Flatflicker, otherwise default to 'en' #} + {% set locale = app.user.locale|split('_')|first %} + {% if not locale in 'ar|at|az|be|bg|bn|bs|cs|cy|da|de|eo|es|et|fa|fi|fo|fr|ga|gr|he|hi|hr|hu|id|is|it|ja|ka|km|ko|kz|lt|lv|mk|mn|ms|my|nl|no|pa|pl|pt|ro|ru|si|sk|sl|sq|sr|sv|th|tr|uk|uz|vn|zh'|split('|') %} + {% set locale = 'en' %} + {% endif %} ({{ macro.relative_datetime(value) }}) {% endif %} - + {% endblock %}