Locales

Language and locale codes by country

A language code answers a different question from a locale tag. A locale adds useful regional or script context when the product needs it.

Choose the least-specific tag that is correct

Use a language-only tag when a region or script does not change product behavior. Add a region or script only when the content, formatting, or user expectation actually requires it.

Do not infer a user preference from a country alone

Country data is a useful default for a reference page, not a substitute for a user-selected language. Preserve a user choice whenever the product can do so.

Data provenance

Sources