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

country vs sortingCode #434

Closed
agektmr opened this issue Feb 23, 2017 · 3 comments
Closed

country vs sortingCode #434

agektmr opened this issue Feb 23, 2017 · 3 comments
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. question

Comments

@agektmr
Copy link

agektmr commented Feb 23, 2017

According to the spec:
country: This is the [CLDR] (Common Locale Data Repository) region code. For example, US, GB, CN, or JP.
sortingCode: This is the sorting code as used in, for example, France.

These look counterintuitive for me. Also, it's not super clear what sortingCode is. In Chrome, I only get blank "".
Shouldn't these be swapped? Are these intentional?

For reference, in ApplePayJS:
country: The colloquial country name for the contact.
countryCode: The contact’s ISO country code.

@marcoscaceres marcoscaceres added question i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. labels Feb 23, 2017
@marcoscaceres
Copy link
Member

Would really like the i18n WG to take a look at all this 😬

@rsolomakhin
Copy link
Collaborator

  1. PaymentRequest's sortingCode:

Sorting code is also known as CEDEX. See Wikipedia entry for some background.

The sortingCode field would be non-blank only for countries that support it. Try an address in France, for example. The address editor UI in Chrome will show the sorting code field in that case.

  1. PaymentRequest's country:

The country field in PaymentRequest is equivalent to the countryCode field in Apple Pay JS.

  1. Apple Pay JS's country:

The country field in Apple Pay JS does not have an equivalent field in PaymentRequest. If a merchant needs to map the CLDR country code to a country name, they would need to use a helper library.

@agektmr
Copy link
Author

agektmr commented Feb 24, 2017

Thanks @rsolomakhin for clarification. As long as this is not a typo / mistake, I'm fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. question
Projects
None yet
Development

No branches or pull requests

3 participants