w3c / i18n-activity

Home pages, charters, style-guides, and similar documents related to the W3C Internationalization Activity.
67 stars 23 forks source link

Currency symbol handling #1044

Closed aphillips closed 3 years ago

aphillips commented 3 years ago
  1. PaymentCurrencyAmount dictionary https://www.w3.org/TR/2020/CR-payment-request-20201203/#paymentcurrencyamount-dictionary

However, the set of combinations of currency code for which localized currency symbols are available is implementation dependent. Where a localized currency symbol is not available, a user agent SHOULD use U+00A4 (¤) for formatting. User agents MAY format the display of the currency member to adhere to OS conventions (e.g., for localization purposes).

And also:

Current implementations will therefore allow the use of well-formed currency codes that are not part of the official [ISO4217] list (e.g., XBT, XRP, etc.). If the provided code is a currency that the browser knows how to display, then an implementation will generally display the appropriate currency symbol in the user interface (e.g., "USD" is shown as "$", "GBP" is "£", and the non-standard "XBT" could be shown as "Ƀ"). When a code cannot be matched, the specification recommends browsers show a scarab "¤".

Several issues here:

  1. (editorial nit) Please don't refer to U+00A4 informally ("show a scarab"). It is a good idea to use the Unicode name and/or U+ notation (as you do elsewhere) for clarity.
  2. Currency display is a complex topic and currency symbols have a certain amount of range, even within a given currency. It seems like it would be more effective to allow the user agent to localize the display of the currency and its value in a localized manner (noting that the language of the context, such as the web page, where the value is rendered constitutes a locale).
  3. Note that some symbols, such as (particularly) $ are ambiguous due to use across a number of different currencies.

Instructions:

This follows the process at https://w3c.github.io/i18n-activity/guidelines/review-instructions.html

  1. CREATE A PROPOSED REVIEW COMMENT BY REPLACING THE PROMPTS ABOVE THIS PARAGRAPH, BUT LEAVE THIS PARAGRAPH INTACT AS WELL AS THE TEXT BELOW IT Then ask the i18n WG to review your comment.

  2. Set a label to identify the spec. This starts with s: followed by the spec's short name. If you are unable to do that, ask a W3C staffer to help.

  3. After discussion with the i18n WG, raise this issue to the WG that owns the spec. Use the text above this para as the basis for that comment.

  4. Replace the text 'link_to_issue_raised' below with a link to the place you raised the issue. Do NOT remove the initial '§ '.

  5. Edit this issue to remove this paragraph and ALL THE TEXT ABOVE IT.

  6. Remove the 'pending' label.

This is a tracker issue. Only discuss things here if they are i18n WG internal meta-discussions about the issue. Contribute to the actual discussion at the following link:

§ link_to_issue_raised

marcoscaceres commented 3 years ago

(editorial nit) Please don't refer to U+00A4 informally ("show a scarab"). It is a good idea to use the Unicode name and/or U+ notation (as you do elsewhere) for clarity.

https://github.com/w3c/payment-request/pull/942

Currency display is a complex topic and currency symbols have a certain amount of range, even within a given currency. It seems like it would be more effective to allow the user agent to localize the display of the currency and its value in a localized manner (noting that the language of the context, such as the web page, where the value is rendered constitutes a locale).

I've tried to clarify this also in https://github.com/w3c/payment-request/pull/942

Note that some symbols, such as (particularly) $ are ambiguous due to use across a number of different currencies.

Good point... added example to https://github.com/w3c/payment-request/pull/942

In practice, user agents are all including the currency code. Apple Pay actually excludes the symbol entirely, which is probably for the best.

r12a commented 3 years ago

The above comment should be added to the issue if we raise it in the payment-request repo. Please don't continue the discussion here.

aphillips commented 3 years ago

The minor textual nits were corrected by @marcoscaceres in w3c/payment-request#942. The I18N WG decided in our teleconference of 2021-03-25 that the remainder of this comment was not an issue.