Skip to main content

XTM Connect – Drupal 8.x-7.0

Displaying a Drupal language short code

In Drupal, each configured language is identified by its language short code. This short code has the standard form aa-xxxx. This consists of:

  • an ISO 639-1 language code (two letters) and (if required), a hyphen separator and then

  • an ISO 15924 script code (up to four letters). This suffix is used to identify different variants of the same language. These variants can be geographical or be used to identify different script (writing) systems.

Examples

Language

Language short code

Notes

Burmese

my

From the country name, Myanmar.

Portuguese

pt

pt-pt

pt-br

From the country name, Portugal.

Suffix: the script code for Portuguese as spoken in Portugal.

Suffix: the script code for Portuguese as spoken in Brazil.

Chinese

zh

zh-hans

zh-hant

From the Chinese word "zhongwen" meaning "simplified Chinese language".

Here, the "hans" script code suffix is formed from "han", meaning "script standardized during the Han dynasty", plus "s" for "simplified".

Here, the "hant" script code suffix is formed from "han", meaning "script standardized during the Han dynasty", plus "t" for "traditional".

To view a Drupal language code:
  1. Select the Configuration tool bar button in the Home screen.

  2. In the Configuration screen, select the Languages option in the REGIONAL AND LANGUAGE section.

    You see the languages that have been configured, in the List tab screen.

  3. At the end of the line containing the language whose short code you want to view, select the Edit button. You see the Edit language screen.

  4. Find the Language code label. The language short code is displayed below it.

  5. To close the screen, select the Save language button.

Note

We recommended that you do not change the language code settings for configured Drupal languages. If you do so, these languages might not be recognized in XTM Cloud and the translation projects in which they occur will fail.