-
Notifications
You must be signed in to change notification settings - Fork 87
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
Date and time localization #337
Comments
This sounds like you are missing the Intl module. If you don't have this
module installed the dates don't get localized automatically, instead you
will need to change a setting to use 24 hour time manually. You can do this
on the Admin Settings page, you can also change the format for the 24 hour
time there as well.
You can enable 24 hour time from the frontend, but you cannot change the
formatting of the time from the frontend because that would be an XSS
vulnerability.
Let me know if you continue having issues getting 24 hour time working.
…On Sat, Nov 19, 2022, 7:03 AM nsuomine ***@***.***> wrote:
If I understand correctly, dates and times should be localized
automatically according to the language setting. But if I set the language
to de-de, it seems that times are still using the format 1:20 pm instead
13:20.
I also tried to override time-format and time-pattern settings when
creating hashOver object but I was not able to change the time format to
24h. Probably, I am doing something wrong.
—
Reply to this email directly, view it on GitHub
<#337>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDV75XC3R3SKKADTMHZ2YTWJDT2NANCNFSM6AAAAAASFLM6FU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you. I try first to install the module. I need to change the behaviour from the fronted because my site is multilingual. Intl module seems to be the only way then? |
I checked that I have the Intl module installed but still the format is incorrect. Because the site is bilingual, the date format should change according to the language. On my CMS, I can modify page templates to pass parameters to the Hashover object. Managing backend settings is not a solution because that would affect all pages. |
Unfortunately, I have not been able to get time and date localization working. I have the intl module activated from my hosting provider. No matter which language setting I specify, there is always a 12-hour time format. Not sure how to debug if the intl module is working. My site is bilingual so I can use static formatting settings. |
If I understand correctly, dates and times should be localized automatically according to the language setting. But if I set the language to de-de, it seems that times are still using the format 1:20 pm instead 13:20.
I also tried to override time-format and time-pattern settings when creating hashOver object but I was not able to change the time format to 24h. Probably, I am doing something wrong.
The text was updated successfully, but these errors were encountered: