Store localization
Most of the text that appears to be hard-coded on pages throughout your store can be instantly changed to a different language by changing the locale of the view. Changing the locale does not actually translate the text word-for-word, but simply references a different translation table that provides the interface text that is used throughout the store. The text that can be changed includes navigational titles, labels, buttons, and links such as My Cart and My Account. You can also use the Inline Translation tool to touch up text in the interface.
Language packs can be found under Translations & Localization on Commerce Marketplace. New extensions are continually added to Marketplace, so check back often.
Step 1: Install a language pack
Follow the standard instructions for installing the language pack extension. For detailed information about installing an extension, see General CLI installation in the Extensions Guide.
Step 2: Create a store view for the language
-
On the Admin sidebar, go to Stores > Settings > All Stores.
-
Click Create Store View.
-
Set the options for the new store view:
-
Store — Choose the store that is the parent of the view.
-
Name — Enter a name for the store view. For example: Portuguese.
In the header of the store, the name appears in the language chooser.
-
Code — Enter a code in lowercase characters to identify the view. For example:
portuguese
. -
Status — To activate the view, set to
Enabled
. -
Sort Order — (Optional) Enter a number to determine the sequence in which this view is listed with other views.
-
-
When complete, click Save Store View.
Step 3: Change the locale of the store view
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the Scope dropdown, select the store view to configure, and click OK when prompted.
-
On the General configuration page, expand the Locale Options section.
-
Clear the Use Website checkbox and set Locale to the language that you want to assign to the view.
If there are several variations of the language available, make sure to choose the one for the specific region or dialect.
-
When complete, click Save Config.
After you change the language of the locale, the remaining content that you have created, including product names and descriptions, categories, CMS pages, and blocks must be translated separately for each store view.
Localize products
If your store has multiple views in different languages, the same products are available in each store view. You can use the same basic product information, such as SKU, price, and inventory level, regardless of language. Then, translate only the product name, description fields, and meta data as needed for each language.
Step 1: Translate product fields
-
On the Admin sidebar, go to Catalog > Products.
-
In the grid, find the product to be translated and open it in edit mode.
-
In the upper-left corner, set Store View to the view for the translation and click OK when prompted to confirm.
-
For each field to be edited, do the following:
-
Deselect the Use Default Value checkbox to the right of the field.
-
Either paste or type the translated text into the field.
Make sure to translate all text fields, including image labels and Alt text, Search Engine Optimization fields and any Custom Options information.
-
-
When complete, click Save.
Step 2: Translate field labels
-
On the Admin sidebar, go to Stores > Attributes > Product.
-
In the list, find the attribute to be translated and open in edit mode.
-
In the left panel, choose Manage Labels.
-
In the Manage Titles section, enter a translated label for each store view.
{width="600" modal="regular"}
-
When complete, click Save Attribute.
Step 3: Translate all categories
-
On the Admin sidebar, go to Catalog > Categories.
-
At the upper-left corner, set Store View to the view for the translation and click OK when prompted to confirm.
-
In the tree, find the category to be translated and open it in edit mode.
-
For Basic Information, translate Category Name.
-
Expand the Content section and translate Description.
-
Expand the Search Engine Optimization Settings section and translate the following fields:
- Meta Title
- Meta Keywords
- Meta Description
-
Under the Search Engine Optimization Settings section, do the following to translate the URL Key:
-
Clear the Use Default Value checkbox to the right of the field.
-
Enter the translated text.
-
Make sure that the Create Permanent Redirect for old URL checkbox is selected.
-
-
When complete, click Save Category.
-
Repeat the process for all categories used in the store.
Step 4: Translate product attributes and attributes options
-
On the Admin sidebar, go to Stores > Attributes > Product.
-
Select the attribute to be translated.
-
Choose Manage Labels on the left and set the Managed Titles options to define the attribute title translations.
-
Choose Properties on the left and enter the translated attribute options in the Manage Options section.
{width="600" modal="regular"}
-
When complete, click Save Attribute.