Internationalisation
Internationalization is only enabled on certain clientTokens. It also applies only to specific entities, and only to selected properties of those entities.
(Non-exhaustive) list of translated entities/properties
| Entity | Property |
|---|---|
Product | name |
Product | description |
Offer | name |
Offer | cancellationTerms |
Offer | legalNotices |
CountermarkCampaign | name |
GoodwillGestureAutomatic | name |
GoodwillGestureAutomatic | publicDescription |
SpecialOffer | publicName |
Retrieve entity translations
INFO
The default language used for content is based on the first configured value among — in order — contact language → club language → clientToken primary language → clientToken secondary language.
General principles
- Translatable entities (listed above) include the
translationObjectproperty. - This property can be
nullif no translation has been saved. - When provided, this property contains the translation object, representing all translatable properties for each language with their corresponding translations.
translationObject
This translationObject property is added only:
- On
GET item(e.g.GET /:clientToken/products/:id) - On
GET collectiononly if the?withTranslations=1parameter is present
Example
Example of a request retrieving catalog products with their translations.
-------------------------------------------------[--------v--------]
curl --location 'https://.../clientToken/products?withTranslations=1&itemsPerPage=30&page=1' \
--header 'x-gravitee-api-key: xxxxx-yyyy' \
--header 'authorization: Bearer eyJ0eXAiOGrT8drJ9z47t-wX3Wmb8Fy60' \
--header 'x-user-club-id: /clientToken/clubs/1019' \
--header 'x-user-network-node-id: /clientToken/network_nodes/932'{
"@context": "/clientToken/contexts/Product",
"@id": "/clientToken/products/417401",
"@type": "http://schema.org/Product",
"description": "My French product description", // Description in the default language
"name": "My awesome French product", // Name in the default language
"code": "SUBSCRIPTION_417401",
"type": "subscription",
"minDisplayedPrice": null,
"offers": [
{
"@id": "/clientToken/offers/190771",
"@type": "Offer",
"contractModel": null,
"name": "tarif FR",
"description": null,
"level": 0,
"context": [],
"configuration": {
"linkedBundle": false,
"bundlePeriodicity": "monthly"
},
"priceTI": 0,
"priceTE": 0,
"registrationFeeTI": 0,
// ...
"translationObject": {
"@context": "/clientToken/contexts/TranslationObject",
"@id": "/clientToken/translation_objects/59",
"@type": "TranslationObject",
"resource": "offers",
"resourceId": "190771",
"content": {
"es": {
"name": "My Spanish rate"
},
"it": {
"name": "My Italian rate"
}
}
},
// ...
}
],
"contractModel": null,
"createdAt": "2026-03-11T10:17:46",
// ...
"translationObject": { // Translation object
"@context": "/clientToken/contexts/TranslationObject",
"@id": "/clientToken/translation_objects/58",
"@type": "TranslationObject",
"resource": "products",
"resourceId": "417401",
"content": { // For each language
"es": { // Language ISO code
"name": "My product name in Spanish", // Name in this language
"description": "My product description in Spanish" // Description in this language
},
"it": {
"name": "My product name in Italian",
"description": "My product description in Italian"
}
}
}
}Specific cases related to translated entities
Products and offers are translatable, but once they are sold (added to cart), the offer names shown in Article entities (cart, sale) are translated into the contact language (if provided and if the corresponding translation exists).
This also applies to the rest of the article lifecycle (invoice, credit notes).
Contracts and invoices
Contracts and invoices use templates. These templates can have translated versions. When the contract or invoice is generated, the associated template is retrieved in the language of the contact for whom the contract/invoice is issued.
This applies even when the sale has not yet been finalized (contract preview during the sales flow).
As mentioned above, articles—especially as shown on invoices—are also automatically translated into the contact language.