Locales
A locale is a BCP 47 tag that sets the language of human-readable text, such as the message in an error response. Everything else in a response is the same in every locale.
Supported locales
Section titled “Supported locales”A locale field in a request, such as the one in user settings, has to be one of these values exactly, with the same case.
| Value | Description |
|---|---|
| ar | Arabic |
| bg | Bulgarian |
| cs | Czech |
| da | Danish |
| de | German |
| el | Greek |
| en-GB | English (United Kingdom) |
| en-US | English (United States) |
| es-ES | Spanish (Spain) |
| es-419 | Spanish (Latin America) |
| fi | Finnish |
| fr | French |
| he | Hebrew |
| hi | Hindi |
| hr | Croatian |
| hu | Hungarian |
| id | Indonesian |
| it | Italian |
| ja | Japanese |
| ko | Korean |
| lt | Lithuanian |
| nl | Dutch |
| no | Norwegian |
| pl | Polish |
| pt-BR | Portuguese (Brazil) |
| ro | Romanian |
| ru | Russian |
| sv-SE | Swedish |
| th | Thai |
| tr | Turkish |
| uk | Ukrainian |
| vi | Vietnamese |
| zh-CN | Chinese (Simplified) |
| zh-TW | Chinese (Traditional) |
Negotiation
Section titled “Negotiation”When you're signed in and your account has a saved locale, the API uses it. Otherwise the API picks a locale from the Accept-Language header and uses en-US when the header is missing or nothing in it matches.
The API sorts the Accept-Language tags by q weight and makes two passes over them. Matching ignores case and accepts _ in place of -.
- The first tag that is a supported locale wins.
svcounts assv-SE, andnbandnncount asno. - If no tag matched, the first tag whose language subtag has a locale wins, and
fr-CApicksfr. A Chinese tag withHant,TW,HKorMOpickszh-TW. The language subtags below pick a set locale.
| Language subtag | Locale |
|---|---|
en | en-US |
es | es-ES |
pt | pt-BR |
zh | zh-CN |