Knowledgebase

How to add languages and translate text in Magento

If you want your Magento store to be available in more than one language, you can add languages and translate the text that is displayed on your site. Each language is represented and displayed by a store view. On the frontend there's a drop-down menu from which customers can choose the store view/language. So the first thing to do is to create a store view. In the admin panel of your Magento go to System>Manage Store. On the page that opens you'll see a table with the existing stores and store views. To edit the settings of a store view click on its name in the table. To add a new store view click on the Create Store View button above the table. On the page with the store view settings you have to choose the store to which you want the store view to belong (if you have a multistore), you have to type a name and a code for the store view (the code can be the same as the name but you should use only lowercase letters and you should separate words with underscores). If you want customers to be able to select that store view, set its status to Enabled. Optionally, you can also specify its position in relation to other store views from the Sort Order setting. Then click on the Save Store View button.

Default text strings such as the different links and block titles can be translated manually by using the built-in tool, or you can save some time by uploading a language pack (provided there's one for the language that you want to add). You can find many language packs in the translations section of the official Magento site. Download the archive to your local computer and unzip it. If, for example, the language is French the unzipped folder will be labeled fr_FR. Open it and navigate a few levels down to fr_FR/app/locale/fr_FR. Upload the folder that's inside locale (e.g. the second fr_FR folder) to the same location on your hosting account. For example, if your store is installed directly in the public_html folder on your Magento hosting account, then you need to upload the folder to public_html/app/locale.

In case some text is not translated or you want to change it anyway, you can do that manually. In the admin panel go to System>Configuration>Developer button in the Advanced section on the left>Translate Inline panel on the right. Set the Enabled for Frontend drop-down menu to Yes to edit frontend translations and the Enabled for Admin drop-down menu to Yes to modify backend translations. It's also recommended to restrict the use of this tool so that nobody else but yourself can modify translations. You can do that on the same page from the Developer Client Restrictions panel; just list your IP address in the field for Allowed IPs.

Note that after you install a language pack and you switch the store view on the frontend to the particular language, the translations will not be displayed instead of the default text. In order for this to happen you have to change the locale of the store view. To do this, in the admin panel go to System>Configuration>General button in the General section on the left>Locale Options panel on the right. Select the store view from the Current Configuration Scope drop-down menu that's in the upper left corner of the page. Then in the Locale Options panel on the right unmark the Use Website checkbox next to the Locale drop-down menu and from the drop-down menu itself select the language that corresponds to the store view.

To translate the names and descriptions of categories and products you have to edit each category and product. When you go to the page with the settings of the category/product select the store view from the Choose Store View drop-down menu in the upper left corner, then unmark the Use Default Value checkbox for the particular option and edit the value of the option.

For screenshots and some more details you can also read the tutorial on how to create a multilingual store in Magento.

Was this answer helpful?

 Print this Article

Also Read