-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Language argument support for the date filter #3006
Comments
Not quite the same issue, but we have a site where we need the dates to come out in Thai, which has it's own set of numerals ( ๑๒๓๔๕๖๗๘๙๐ ). And I'm sure there are other languages with their own locale-specific sets of numerals. Not sure if that can also be covered in this request. To be honest, though, although dates are the most common need here, we did have another site where we needed to make sure that all numbers, even in body fields, ended up in Thai, so in the end we had to run most of our Twig output fields through a macro, which achieved what we were after with dates (and everything else). |
There's a little precidence for this, I guess, in that the |
…and done, for the {{ now|date(locale='en-US') }}
<!-- outputs "Jun 19, 2018" -->
{{ now|date(locale='en-GB') }}
<!-- outputs "19 Jun 2018" --> |
In some case I want to have the date in specific language format at site not same locale.
For example:
In Japanese site, if I write
it output in Japanese format like "6月 19, 2018".
but I want it to display "Jun 19, 2018" as in English format.
So tried...
also suggested better solution by carlcs in #craft3-hlp at Slack.
those work OK but It would be nice to have the
date
filter support for a language argument.The text was updated successfully, but these errors were encountered: