Skip to content
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

Open
nsuomine opened this issue Nov 19, 2022 · 4 comments
Open

Date and time localization #337

nsuomine opened this issue Nov 19, 2022 · 4 comments

Comments

@nsuomine
Copy link

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.

@jacobwb
Copy link
Owner

jacobwb commented Nov 19, 2022 via email

@nsuomine
Copy link
Author

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?

@nsuomine
Copy link
Author

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.

@nsuomine
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants