You are browsing upcoming documentation for version 5.1 of OroCommerce, OroCRM, and OroPlatform, scheduled for release in March 2023. Read version 5.0 (the latest LTS version) of the Oro documentation to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
Translate Product Attribute Labels and Options
This section is part of the Localization and Translation concept guide that provides a general understanding of the localization and translation processes in OroCommerce.
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 > Localization in the main menu.
In the Localization Settings, select the required localization from the list to add to Enabled Localizations.
Make sure you have created the corresponding localization in the System > Localization > Localizations 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 localization that you have just added (e.g., German) as the default language for your application and for the UI system elements and content displayed in the back-office and in the storefront.
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).
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 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, the 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:
Languages — All (or selected)
Key — [Your Key] e.g. oro.product.deutsch_demo_attribute.label
If the attribute has been created in English, use the following filters to narrow down the search and locate the attribute label key:
English Translation — [Attribute Name], e.g, english_demo_attribute
Language — English
Once you locate the key, you can use it to translate the label into any selected language using the Key filter:
Key — [Your Key] e.g. oro.product.english_demo_attribute.label