×
Login or create an account
If you have an account with us, please log in.

You have no items in your shopping cart.

How to enable Inline Translation in Magento 1/2?

In case you’ve already installed your language packs and created different store views for different languages, it’s about time to think over the inline translation.

What is inline translation in Magento?

The Translate Inline option does well when you need translations for your website but translation packs are not fully translated. As translation function is not applicable for static blocks and CMS pages, you can achieve it via the inline translation. To translate text on your store frontend you need to make the next configurations:

Magento 1 & Magento 2 inline translation configuration [Admin Panel]

Relying on the version of the platform in use decide on the steps.

Step 1: Magento 1

  • Navigate to the Admin Panel> System> Configuration:

1-magento-1-system-configuration

  • Find the Developer tab under Advanced settings and preset it:

3-magento-1-advanced-developer

  • Open the Translate Inline options:

5-magento-1- translate-inline

  • Set the ‘Enable for Frontend’ option to ‘Yes’ and click the ‘Save Config’ button:

7-magento-1-enable-for-frontend

Step 1: Magento 2

  • Navigate to the Admin Panel> Stores> Configuration:

2-magento-2-stores-configuration

  • Find the Developer tab under Advanced settings and preset it: 

4-magento-2-advanced-developer

  • Open the Translate Inline options:

6-magento-2-translate-inline

  • Set the ‘Enable for Frontend’ option to ‘Yes’ and click the ‘Save Config’ button:

8-magento-2-enable-for-frontend

Step 2: Store frontend (Magento 1&2)

  • Once the Translate Inline is enabled and you see the message, clear the cache:

message-magento-translate

  • Then navigate to your store frontend and refresh the page. Thus, different sections of text on your website are placed into red frames:

10-magento-frontend

  • Let’s assume you want to change the ‘Cart’ section to ‘My Cart’. Mouseover the red frame and click the icon with a book:

11-magento-storefront-book

  • Change the ‘Cart’ for ‘My Cart’ in the ‘Custom’ field of the pop-up window and click the ‘Submit’ button to save the settings:

12-custom-settings

  • Refresh the page to make sure all set:

13-ready-my-cart

  • Once you’ve finished with the settings, don’t forget to disable the Translate Inline option and press the ‘Save Config’ button.

How to configure Magento 2 inline translation programmatically?

To adjust your store with multiple languages programmatically, you need to find the Magento 2 translation file, which is located in the i18n folder.

We’ll take an example of the Magento Luma theme. In this case, the Magento 2 translation CSV file is located in: <Magento_Luma_theme_dir>/i18n/en_US.csv.

In this file, you’ll find Magento 2 translation table where (a) the left column contains the default values (keys), and (b) the right column contains the values, which should be used instead when Luma is applied:

"Add to Wish List",
"Add to Compare",
"Your Checkout Progress",
"Card Verification Number",

"Wish List"
"Compare"
"Checkout Progress"
"CVV"

Thus, if fr_FR.csv dictionary is added to the Luma theme, it will look as follows:

"Add to Wish List",
"Add to Compare",
"Your Checkout Progress",
"Card Verification Number",

<translation>
<translation>
<translation>
<translation>

To make the changes:

  • Create a new translation file, e.g: <Magento_Luma_theme_dir>/i18n/de_DE.csv;
  • Find a string (strings) that needs to be changed in the right column;
  • Replace the string (strings) with the needed equivalent, e.g.: "Add to Wish List" to "Wunschliste";
  • Save the changed file on your server. In case you edit it locally, upload it to your website;
  • Once it’s done, flush Magento 2 cache.

Note that you can also generate a dictionary for the theme by using the  i18n tool

Magento Inline Translation is not working

There are several tips for avoiding widespread mistakes:

  • enable the Translate Inline option for the current store view only and for the remaining stores you need to disable it;
  • open your store frontend via Firefox (or install a new ‘fresh’ browser) and use the hard refresh option;
  • navigate to your cache management and disable everything odd.
Rate the answer?
Back to top