# General Translation Platform: Understanding locale codes URL: https://generaltranslation.com/en-GB/docs/platform/core/guides/locale-codes.mdx --- title: Understanding locale codes description: What are locale codes, and how are they used in the General Translation stack? related: links: - /docs/platform/core/guides/translating-strings - /docs/platform/core/guides/translating-files --- General Translation uses locale codes to identify and translate between languages, scripts and regions. ## What are locale codes? [#locale-codes] A locale is **a language or dialect**. Locale codes are a standardised way of referring to locales. For example, `en-US` is a locale code that refers to English as spoken in the United States of America. Locales can be general or specific: * `zh` is Chinese * `zh-Hant` is Chinese, written with traditional characters * `zh-Hant-HK` is Chinese, written with traditional characters, as spoken in Hong Kong Locale codes tell General Translation what language a source file is written in, what language to translate into, and how to format locale-aware values such as dates, numbers, and currency. ## How locale codes work [#locale-codes-work] General Translation uses the **[BCP 47 Language Tag](https://www.techonthenet.com/js/language_tags.php)** standard to define locale codes. This Internet Best Current Practices (BCP) standard for languages defines a uniform way to specify both spoken and written languages. A locale code can include several subtags separated by the `-` character: * **Language code** (required): Represents the primary language, such as `en` for English or `es` for Spanish. Language codes follow **[ISO-639](https://wikipedia.org/wiki/List_of_ISO_639_language_codes)**. * **Script code** (optional): Indicates the writing system, such as `Latn` for the Latin alphabet. Script codes follow **[ISO-15924](https://en.wikipedia.org/wiki/ISO_15924)**. * **Region code** (optional): Specifies a country or region, such as `US` for the United States or `FR` for France. Region codes follow **[ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-2)**. For example, `zh-Hant-HK` is broken down into: * `zh` for Chinese * `Hant` for Traditional Chinese characters * `HK` for Hong Kong Together, `zh-Hant-HK` means "Chinese, written in Traditional Chinese characters, as spoken in Hong Kong." ### Equivalent locale tags Some locale tags are functionally equivalent for translation. For example, `fr` means French, which is equivalent to: * `fr-FR`, which means French as used in France. * `fr-FR-Latn` which means French as used in France, written with the Latin alphabet. The General Translation libraries and platform usually do not distinguish between equivalent codes, since the translation output would be the same. ### Common locale codes | Locale code | Language | Script | Region | Description | | ------------ | ---------- | ------------------- | -------------- | ---------------------------------------- | | `en` | English | - | - | English | | `en-US` | English | - | United States | English as used in the United States | | `en-GB` | English | - | United Kingdom | English as used in the United Kingdom | | `es` | Spanish | - | - | Spanish | | `es-419` | Spanish | - | Latin America | Spanish as used in Latin America | | `fr` | French | - | - | French | | `fr-CA` | French | - | Canada | French as used in Canada | | `de` | German | - | - | German | | `de-AT` | German | - | Austria | German as used in Austria | | `ru` | Russian | - | - | Russian | | `zh-CN` | Chinese | - | Mainland China | Chinese as used in Mainland China | | `zh-Hant` | Chinese | Traditional Chinese | - | Chinese, Traditional script | | `zh-Hant-SG` | Chinese | Traditional Chinese | Singapore | Traditional Chinese as used in Singapore | | `ja` | Japanese | - | - | Japanese | | `ko` | Korean | - | - | Korean | | `pt-BR` | Portuguese | - | Brazil | Portuguese as used in Brazil | | `it` | Italian | - | - | Italian | ## General Translation supported locales [#supported-locales] The `generaltranslation` library supports any valid locale tag, including private-use codes with no widely recognised meaning. However, the General Translation platform only translates locales supported by GT. See an up-to-date, searchable list on the [Supported locales](/docs/platform/dashboard/reference/supported-locales) page. ## Next steps - /docs/platform/core/guides/translating-strings - /docs/platform/core/guides/translating-files