Translate Product Data
General
You can use the create attribute translations endpoint to create new or update existing attribute translations.
There are 2 different endpoints to update the simple and advanced attributes. It's made because of the way they are presented, stored and used. But for simplicity we can distinguish them as shared (simple) and non-shared (advanced) attributes.
Admin API
Create Simple Attribute Translations
When you work with attribute translations, you can only create and update simple attributes with this endpoint. Simple attributes contain clearly defined single values, e.g., size or color options.
About this Method
The method is used to create new or update existing simple attribute translations.
This method cannot be used to create or update advanced attribute translations. Please use the endpoints to create products/variants if you need to modify advanced attributes and their translations.
Method Signature
Details
The provided value must include a translation for the default system language. It is used to resolve an existing attribute value you wish to add translations for. This means, that it is not possible to add translations for an attribute, which has not been yet created via the product creation or a similar endpoint.
Examples
Create, Update or Delete Advanced Attribute Translations
Advanced attributes contain a more complex structure (see more here). The endpoint is created to work with translatable advanced attribute types, i.e. attribute groups that contain one or more text
or longtext
field types.
About this Method
The method is used to create, update or delete translations for advanced attribute.
This method doesn't trigger webhook actions after the operation.
Method Signature
Details
The provided value must include a translation for the default system locale and it should contain only valid existing locales. This translation for the default language is being used to generate a hash (MD5 from the translation) and all provided translations will be grouped by this hash.
Examples
Partial Update Or Create Attribute Translations
This endpoint can be used to partially update or create simple attribute translations. A dictionary of locales and translations has to be provided.
About this Method
The method is used to partially update existing or create new simple attribute translations. Translations for locales omitted in the payload are ignored.
This method cannot be used to create or update advanced attribute translations. Please use the endpoints to create products/variants if you need to modify advanced attributes and their translations.
Method Signature
Details
The provided value must include a translation for the default system language. It is used to resolve an existing attribute value you wish to add translations for. This means, that it is not possible to add translations for an attribute, which has not been yet created via the product creation or a similar endpoint.
Examples
Get a Collection of Attribute Translations
You can not only retrieve translations for single simple attributes. By extending your query, you can also get multiple translations.
About this Method
This method can be used to get a collection of translations for an existing simple attribute.
The method does not return advanced attribute translations.
Method Signature
Parameters
Parameter | Details |
---|---|
entities | Object A collection of attribute translations. |