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

Translate dates #153

Open
PanderMusubi opened this issue Jan 8, 2022 · 6 comments
Open

Translate dates #153

PanderMusubi opened this issue Jan 8, 2022 · 6 comments

Comments

@PanderMusubi
Copy link
Contributor

Please, translate the date shown under a post as they are currently all in English. Reported for version 1.5.0.

@george-gca
Copy link
Contributor

This currently has to be done manually, as it has to be with any other string. Date formats are very different from each one.

I created a liquid file to help me implement this. You can check it working on the example page of my template.

@untra
Copy link
Owner

untra commented Feb 25, 2024

Liquid date filter doesn't support parsing dates into other languages than english.

https://freakdesign.com.au/blogs/news/translate-a-liquid-date-string-in-shopify

☝️ This blog post describes a way to accomplish this with extra liquid rpogramming. But otherwise this is not something polyglot can help with currently.

If shopify adds further i18n support to their date filter, this can supported better. Unfortunately I can't help further.

@PanderMusubi
Copy link
Contributor Author

The locales support date formats for languages.

@george-gca
Copy link
Contributor

What do you mean?

@PanderMusubi
Copy link
Contributor Author

Like e.g. Date.0 in https://www.localeplanet.com/icu/nl-NL/index.html

@george-gca
Copy link
Contributor

Yes, but like @untra said it before:

If shopify adds further i18n support to their date filter, this can supported better. Unfortunately I can't help further.

If you check that link it says:

Converts a timestamp into another date format. The format for this syntax is the same as strftime. The input uses the same format as Ruby’s Time.parse.

Unless Ruby's Time.parse and strftime give support for it, there's nothing he can do.

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

No branches or pull requests

3 participants