Translate Product Attribute Labels and Options¶
There are two ways to translate product attribute labels in OroCommerce:
- By changing the source language to the target language for the label and then adding the label translation to the required attribute on its edit page.
- By updating the attribute label translation directly on the Translations page.
You may find option 1 less time consuming and more straightforward. However, with option 2 you can search for any attribute labels or entity fields within a single Translations table.
To translate a product attribute label from English into the required language, change the default language first:
Navigate to System > Configuration > System Configuration > General Setup > Language Settings in the main menu.
In the Language Settings, select the required language from the list to add to Supported Languages.
Make sure you have enabled the corresponding language(s) in the System > Localization > Languages menu to make them available in the list.
Click Save Settings.
Navigate to your user configuration by clicking on your user name on the top right of the page and clicking My Configuration.
Clear the Use Organization checkbox and set the language that you have just added (e.g. German) as the default language for the UI elements displayed in the management console.
Click Save Settings.
Once the default language is changed, update the label for the required product attributes:
Navigate to Products > Product Attributes in the main menu.
Open the edit page of the required product attribute.
Update the text for the label.
Keep in mind that if an attribute is of a select or multi-select type, you can provide a proper translation to its options directly from the attribute edit page.
Click Save and Close (or its version in your default language).
Update the translation cache by clicking on the link in the pop-up dialog.
Once you are redirected to the translations page, click Update Cache (or its version in your default language) on the top right.
The product attribute label and it options are updated in the storefront.
To translate a product attribute label from within the Translations grid, navigate to System > Localization > Translations in the main menu.
If the attribute has been created in one of the supported languages in a language other than English, use the following filters to narrow down the search and locate the attribute label key:
Languages — The language in which the attribute was created
Translated Value — [Attribute Name] or its part, e.g demo_attribute
English Translation – Not available
Please note that when an attribute is created under a non-English localization, English translation is absent.
Key — oro.product.
All product attribute labels start with oro.product. and include the name of the attribute (often with underscores). You are looking for the key that ends with a label. For example, oro.product.deutsch_demo_attribute.label
Domain — messages
Once you locate the key, you can use it to translate the label into any selected language using the following filters:
If the attribute has been created in English, use the following filters to narrow down the search and locate the attribute label key:
Once you locate the key, you can use it to translate the label into any selected language using the Key filter: