Re: [i18n-activity] Note about localization of payment sheet (#1043)

> The user agent's default language and the language of the rendering site or host page might not match. Usually items shown as part of the payment-initiating customer experience should match the language and locale of that experience. Defaulting to the user agent's locale would could thus produce a mixed language experience, which is undesirable.

When implementing the payment sheet in Firefox, we ran into a bunch of issues/restrictions (particularly on mobile / Play Store). In particular, we couldn't ship a localized version of each payment sheet because it ended up hitting the APK size limits, and there was hesitation on including localized content that might not be used, again because of of the additional weight. The compromise was to just use the system default language 😢.

> It seems like a significant oversight not to provide for localizability and language negotiation. The mechanisms for this are well-known and reasonably straightforward. Why isn't this included in this version?

We did have it in the spec that the use agent SHOULD use the language of the web page to localize the payment sheet, but sadly, we couldn't get anyone to implement it, so we removed it:

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

We could add that back in, but I fear it will remain aspirational. 

Here is what the spec used to say:

> Present a user interface that will allow the user to interact with the handlers. The user agent SHOULD prioritize the preference of the user when presenting payment methods. It is RECOMMENDED that the language of the user interface match the language of the body element.


 
 



-- 
GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at https://github.com/w3c/i18n-activity/issues/1043#issuecomment-799991439 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 16 March 2021 06:29:39 UTC