Skip to main content
For administrators setting up a connector.

The rule

TranslationOS recognises the language codes supported by its API. Your platform’s codes have to match, either directly or through an alias.

Normalisation

Before validating, connectors normalise your codes:
  • The variant is capitalised, so pt-pt becomes pt-PT.
  • In three-part codes, the middle part is set to sentence case, so lt-sr-sp becomes lt-Sr-SP.
Validation is case sensitive after that. An alias mapping PT to pt-PT will not match a platform using pt.

Aliases

Where a code cannot be matched, an alias maps your platform’s code to a TranslationOS one. Aliases are created on the TranslationOS dashboards, or by Translated during onboarding. Ask api@translated.com if you are not sure which applies to your account. If no alias matches the normalised code, connectors retry with your platform’s code exactly as it is, which handles irregular custom codes.

What is not supported

  • There is no automatic mapping between code standards. BCP 47 to RFC 3066 and similar conversions need an alias.
  • There is no fallback if an alias is missing. The request is not created.

Practical advice

Where your platform offers Portuguese (Portugal) rather than Portuguese, choose the variant. Several connectors recommend this explicitly, and it avoids ambiguity about which market the translation is for.
Most connectors ask for a screenshot or list of your configured languages, per project or per stack, because each can differ. This is what Translated uses to set up aliases before anything goes wrong.
Adding a target language in your own platform does not tell TranslationOS about it. Tell your account manager, or the first requests in that language will fail validation.

Symptoms of a code mismatch

  • One language is never requested while the others are.
  • An item is ingested but a specific language fails.
  • A connector marks an item with an error referencing a language code.