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

zh-HK locale is resolved to "zh" instead of "zh-Hant-HK" #317

Closed
drmcdev opened this issue Feb 13, 2016 · 3 comments
Closed

zh-HK locale is resolved to "zh" instead of "zh-Hant-HK" #317

drmcdev opened this issue Feb 13, 2016 · 3 comments

Comments

@drmcdev
Copy link

drmcdev commented Feb 13, 2016

In intl.js, "zh-HK" is equal to "zh-Hant-HK" which is traditional Chinese . However in react-intl, it is resolved to "zh" which is simplified Chinese.

@ericf
Copy link
Collaborator

ericf commented Feb 13, 2016

Please provide an example.

@drmcdev
Copy link
Author

drmcdev commented Feb 14, 2016

new IntlRelativeFormat('zh-HK').format(new Date(1526271670524))
'2年后'
new IntlRelativeFormat('zh-Hant-HK').format(new Date(1526271670524))
'2 年後'
new IntlRelativeFormat('zh-Hans-HK').format(new Date(1526271670524))
'2年后'

It means zh-HK is interpreted as 'zh' instead of 'zh-Hant-HK'.

However in intl.js, zh-HK is the same as zh-Hant-HK.

@ericf
Copy link
Collaborator

ericf commented Feb 15, 2016

zh-HK is not a valid locale, use zh-Hant-HK.

@ericf ericf closed this as completed Feb 15, 2016
@ericf ericf removed the needs info label Feb 15, 2016
longlho added a commit that referenced this issue Apr 27, 2020
…317)

fix(@formatjs/intl-relativetimeformat): Use PartitionPattern abstract operation when parsing pattern so we're spec-compliant (pending tc39/proposal-intl-relative-time#114)
fix(@formatjs/intl-listformat): Use PartitionPattern abstract operation when parsing pattern so we're compliant w/ latest version of spec
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