A locale is a set of parameters that defines:

  1. Language
  2. Country (or region)
  3. Other specific cultural elements that vary

    For the purpose of externalized textual data, the language and country data of the locale specification are important.

    Languages are specified in two lowercase ASCII letters. Some examples are en for English and fr for French.

    Country identifiers are specified as two or three uppercase ASCII letters. Some examples are: US, CA, FR, and JP, for United States, Canada, France, and Japan, respectively.

    Standards on page 19 provides more information on language codes and country identifiers.

    A locale is a combination of the language and country identifiers into one string, connected by the underscore (_) character. For example, the locale for English (en) as spoken in the United States (US) is defined as en_US.