Add localization hint for payment sheet#656
Conversation
index.html
Outdated
| with the <var>handlers</var>. Optionally, if | ||
| <var>request</var>.<a>[[\uiLang]]</a> is not null, localize the | ||
| user interface to match, as closely as possible, the language of | ||
| <a>[[\uiLang]]</a>. The user agent SHOULD prioritize the |
There was a problem hiding this comment.
I think you should paragraph break before the last sentence as now it's somewhat disconnected from the rest.
index.html
Outdated
| with the <var>handlers</var>. Optionally, if | ||
| <var>request</var>.<a>[[\uiLang]]</a> is not null, localize the | ||
| user interface to match, as closely as possible, the language of | ||
| <a>[[\uiLang]]</a>. The user agent SHOULD prioritize the |
There was a problem hiding this comment.
Should we state more about what to do if [[uiLang]] is null? For example using the language of the body element?
There was a problem hiding this comment.
Yeah, that might be good to recommend using the document's language.
Having both the API hint and falling back to body's lang seems like it would cover all cases. I don't have a strong opinion, and could definitely live with just "use the document's lang". @michelle, can you think of cases where it would be challenging to just use the document's language? Having said that, implementation support for localizing the UI will remain a challenge for implementers, as we don't generally ship support for multiple UI languages. So we will have to see how much demand there is for this. |
index.html
Outdated
| Optionally, if <var>request</var>.<a>[[\uiLang]]</a> is not null, | ||
| localize the user interface to match, as closely as possible, the | ||
| language of <a>[[\uiLang]]</a>. Otherwise, if | ||
| <var>request</var>.<a>[[\uiLang]]</a> is null, is it RECOMMEDED |
index.html
Outdated
| <dfn>lang</dfn> member | ||
| </dt> | ||
| <dd> | ||
| A [[!BCP47]] language tag representing the preferred language of |
There was a problem hiding this comment.
s/preferred/merchant's preferred/ (what the merchant prefers might not be what the buyer prefers)
|
The |
|
It might be worth looking at what effect, if any, |
* Adds "lang" member to PaymentRequestInit dictionary * Adds processing model for `lang` * Optionally allows UA to localize the payment sheet closes #650
langcloses #650
Preview | Diff