How inline translation works

The right way of translating the Storefront in Magento is by using the translation dictionaries (.csv files) and language packages in the Magento codebase.

That being said, Magento also offers a quick way for store administrators to update and translate text on the Storefront: inline translation.

Inline translations are stored in the database and are theme-specific, which means that they don't apply if another theme is selected for the Magento store after the inline translation is done. As a result, the inline translation should be done again by the store administrator if the theme is changed.

In order to enable the inline translation tool, you should go to the StoresConfiguration page in the admin panel. 

Once you are there, you should go to the Advanced | Developer section, and you will see the drop-down menus to enable inline translation on the storefront and the admin panel:

How inline translation works

If you set the Enable for Storefront to Yes, and you save the new settings, then the inline translation tool will be enabled on the Storefront. If you have cache enabled, then you should clear the cache before reviewing the storefront.

As you can see in the following screen, the inline translation tool is now enabled and each string that can be translated is marked with a red box:

How inline translation works

If you hover over the red box, you will see the book icon that is also visible in the preceding screenshot. If you click on the icon, the following window will be displayed:

How inline translation works

From there, you can specify whether the translation will be specific to the current store view, and then you can set the custom text. In the example below, we replaced Create an Account with Register:

How inline translation works

Now, consider that the inline translation tool has been enabled without restrictions. This means that anybody who has access to the website can see the tool, and they can change the text in your Magento store. This is dangerous and should be avoided.

In order to prevent that, Magento allows you to restrict the inline translation tool just for your computer. You can do this by specifying your IP address in the ADVANCED | Developer | Allowed IPs (comma-separated) section of the store's Configuration page (Stores | Configuration):

How inline translation works

You can add more than one IP to a list of allowed IPs, and just those IPs will have access to the ADVANCEDDeveloper tools.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.90.44