w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Support for language the form is served #819

Closed kennanseno closed 5 years ago

kennanseno commented 5 years ago

We've just implemented multi-language support in our web application and wondering if there's anyway to configure what language the payment-request form is served. I haven't dig through the docs but I'm assuming it's tied to the language that's set in the browser?

Here's a use case to help: We've a customer in Italy that is browsing our store web application in Italian language and buys a product, he/she checks out and uses express checkout but it's served in english.

It would be nice if we can pass a language/locale value in the config as part of the request and the form served on that locale.

ianbjacobs commented 5 years ago

Hi @kennanseno,

Right now the specification says in section 3.3 show():

"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. "

Thus, if you are serving a page in Italian, the recommendation is that the UX match.

@marcoscaceres, @aestes, @rsolomakhin can you speak to how implementations are handling this today?

Thanks!

Ian

cyberphone commented 5 years ago

This is not a great idea. For Web-only applications there is no problem to solve and for native payment applications the platform's locale is the best (only) guide.

rsolomakhin commented 5 years ago

The Chrome payment sheet uses the language of the browser, which defaults to the language of the operating system. Making the sheet follow the language of the web page is a possibility, but is low priority for us.

marcoscaceres commented 5 years ago

Same, low priority for Firefox right now. We need to see how much demand there will be for this.

marcoscaceres commented 5 years ago

Closing, as question was answered. I will update this bug if implementations change.