Translations (t9n) & Localization (l10n)
Learn how the Lucca API handles translations.
Some resource properties in the Lucca API support translations. When they do, the response will include a reserved t9n
object containing localized versions of those properties. This object maps translatable property names to a dictionary of translations, keyed by IETF BCP 47 language tags:
In this example, the name property holds the invariant (default) value. The t9n object provides localized alternatives, allowing the client to choose the most appropriate translation based on user preferences.
t9n
translations are optional and may be incomplete.Client guidance
When displaying localized values, clients should attempt to match the user’s language preferences as closely as possible. A common fallback strategy would be:
Look for a region-specific tag
For example: "fr-CH"
.
Fall back to alternative language tag(s)
For example: "fr-FR"
, then "fr"
.
Finally, use the invariant value
This ensures a graceful degradation in case specific translations are not available.