Localizing Content & Configuration in Magento
A Magento Store Configuration Reference Guide
At first blush, localizing content & configuration in Magento can seem like a complex and convoluted process. In an effort to demystify Magento’s store structure & setup, we created the following diagram and documentation.
New Store View Setup
In our experience, providing a high-level visual diagram that outlines the hierarchy, terminology, and structure of Magento’s store set up (Website > Store > Store View) has proven to be extremely helpful:
After providing a general overview, you can dive into setting up new store(s) by following the instructions below.
Creating a New Store / Root Category
If you’d like to bring over the same default configuration and content from the already established base Website but you want to have a different root category, you’ll want to (1) create a new root category first (under Catalog > Manage Categories) and then (2) create a new Store (under System > Manage Stores) where you’ll set your new root category.
Creating a New Store View
Once you’ve created a new store OR have decided to put your new store view into a shared store, go to System > Manage Stores and select “Create Store View”.
Select the Store, provide a name, a country code (e.g. “cn” or if language/country specific could be something like “cn-us”), and set the Status to “Enabled”
On the Manage Stores page, you’ll now see your new store view on the far right column.
Localizing Content / Configuration
Note: For Category, Products, and Configuration tasks it’s critical to select your correct Store View (located on the top left) before localizing your content/settings.
To translate / localize elements of a category, go into the category configuration, select your correct store view, uncheck Use Default Value and replace the base language version with your translations/localized content.
If you’re sharing a root and subcategories with another store view(s) and you want to hide a particular subcategory from one of the store views, first change set your “Store View” to the correct store.
Then under “Is Active”, select “No” and press save.
To translate / localize elements of a product, go into the product configuration, select your correct store view, uncheck Use Default Value and replace the base language version with your translations/localized content.
If you’re sharing a root category with another store view(s) and you want to feature product in one or more stores and not a particular one, you’ll need to manually hide the products.
To hide products individually, go into your product configuration and first change set your “Store View” to the correct store (see screenshot above).
Then go to the bottom of the “General” section and under “Visibility” select Not Visible Individually and press save.
To hide products in bulk, go to Catalog > Manage Products, first select your store view & then select the products you’d like to hide.
On the top, far right, under “Actions” select Update Attributes and hit submit.
Scroll down to “Visibility”, check the “Change” box & set to Not Visible Individually and press save.
If you have specific attributes visible on the front end (for filtering, search, labeling), you can translate the labels by going to Catalog > Attributes > Manage Attributes, finding the attribute you’d like to translate, hit Manage Label / Options and add translation(s) for your other store view(s).
Blocks / CMS Pages
There is no scope setting for blocks & pages, so new blocks and pages need to be made for the new store views.
If a particular category landing on the English side is utilizing a block or group of blocks, create new, translated versions & in the category for the new store view select the translated block(s) you’d like to feature in either “Display Settings > CMS Block” (and select a new block) or the “Custom Design > Custom Layout” (and replace the block identifiers with your new, translated versions).
Global Translations (recommended for Developers / Super Admins to handle)
Option 1: translate.csv
In each theme override, there is a locale folder. Create a kr_US, cn_US subfolder and copy in the translate.csv. This is intended as a 2-column CSV with English in col A and the target language in col B (this is very similar to the Drupal .po file process)
This lets you get translations done in a CSV that can be checked into version control (usually Git). The English needs to match case and spacing perfectly, and usually a translation cache clear required.
Option 2: Inline translations
An alternative to the translate.csv option (above), is doing inline translations. This is in Config > Advanced > Developer > Translate Inline.
Before setting this from “No” to “Yes” it’s very important to do these 2 things (since this has to be done on production):
- make sure and first set your scope to the store view you’d like to translate.
- under Developer IP restrictions add your IP. This makes it so only the allowed IP's will see the inline translation boxes (otherwise everyone online does).
Go to System > Cache Management and disable Translation and Block output caches.
Front End: Translate
Go to the corresponding store view on the front end & you’ll all translatable theme layer items on pages surrounded in red. On hover, a book icon will show up. Click on it, modify the content, and hit submit.
Refresh and you'll see the change.
To turn off, go Config > System > Advanced > Developer > Translate Inline > Enable on Frontend > No
Then go to System > Cache Management and enable Translation and Block output caches.
If you have any questions about how our configuring your Magento eCommerce Store please feeel free to connect with us on social, or contact us directly to setup a time to chat with one of our TPMs!