- Notifications
You must be signed in to change notification settings - Fork 136
Add localization hint for payment sheet #656
New issue
Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.
By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on ? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit and a suggestion for expansion. Although, just using the language of the body element might suffice for #650 without any new APIs...
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/is it/it is/
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
lang
closes #650
Preview | Diff