-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
formatDate() not returning zh-hans/zh-hant date string #489
Comments
Seems that to have all date displayed across the site to be correctly displayed in zh-hans/zh-hant locale, we will have to rename those jsons as Ghost's api can only take zh-cn/zh-hk style formatting. |
Hi, The function The locale files also don't handle dates, maybe this is an issue with Ghost itself, I would suggest you to reach their support team to see if they can find a proper solution. |
Hi! Thanks for your reply.
The rest of date locale follows this format for Chinese language: zh-cn/zh-hk. Maybe we should consider renaming the locales files' name to this format too as Ghost use zh-cn/zh-hk to select theme's language. |
formatDate()
function usesDate.prototype.toLocaleDateString()
to convert date string, which takes inBCP 47 Language Tags
as locale setting. However, locale files are using zh-hans/zh-hant style formatting, causing the theme to unable to translate date strings.We could either add a layer of translation between zh-hans/zh-hant to zh-cn/zh-hk or update locale jsons; however, the former one isn't very graceful while the latter may result in
Breaking change
. Maybe there is a better solution to this?BTW, thanks for creating this theme!
The text was updated successfully, but these errors were encountered: