v154 · spc locale
Which of your tags would match
The dialog's refusal is a language-matching question, and the platform already answers language-matching questions — through Intl, using the same locale data. Put your tag list in and find out which ones are even well-formed, which the browser has data for, and which one a best-fit match lands on.
Your locale list
| as written | canonical | well formed? | data available? | note |
|---|
"Data available" is Intl.DateTimeFormat.supportedLocalesOf: whether this browser has locale data for the tag. It is not the same question as whether Chrome has a payment dialog translated into that language — the dialog's set is smaller and is not exposed to script — so treat a yes here as necessary rather than sufficient.
What this user's browser prefers
| source | value | what it tells you |
|---|
A caller that sets locale to its own content language is answering a different question than the one the dialog asks. The dialog is in the user's language; the field says what language your text is in. They match when your site is already localised for this user, and not otherwise — which is the case worth designing for.
Some lists, and how they would go
| list | resolves to | matches this user? | verdict |
|---|