How to Enable Magento 2 Inline Translation

Magento 2 is an open source E-commerce platform with features like flexibility, scalability, and cost-effectiveness. With Magento 2 as your online business platform, you have the power to create a highly unique user experience in harmony with enhanced sales chart! 

Magento 2 has a worldwide presence and the admin can localize the storefront to maximize the sales potential. One of the ways to do so is the translation! There are two methods in Magento 2:

Thanks to the latter method, it makes it easy to translate the static blocks and CMS pages too!

Using the translate inline tool in developer mode, when the translate inline mode is activated, the editable text is outlined in red. This way, you can edit the field labels, messages, and other text both in the frontend and the admin panel. All the inline translations are stored in the database under the core_translate table.

Add a new translation to the Default Config or to a specific store view. The overridden string has the format: Module_Name::Original_Translation.

It’s because you add the changes to a specific place (specific module), the same string can also appear in a different module.

How to Enable Magento 2 Inline Translation:

Step 1: Login to Admin Panel

Step 2: Navigate to Stores > Configuration

Step 3: Under Advanced, select Developer

Step 4: Expand the Translate Inline

Step 5: Set “YES” for the Enabled for Storefront option.

1_Enable Translate Inline in storefront

Step 6: Go to frontend where you can see the sections in a red frame that can be translated. Hover the mouse over the frame and you’ll see an “Open Book” icon.

2_Frontend Red frames

Step 7: On clicking that icon, a popup is displayed. In the Custom option, enter your custom text and click the Submit button.

3_Popup

Step 8: The custom text is now displayed in the frontend.

4_Frontend

Step 9: Also, under the Developer Client Restrictions in the Stores > Configuration> Advanced > Developer, enter your IP address in the Allowed IPs option. Doing so, the visitors cannot see the red frame in the frontend.

5_IP restriction

Pros and Cons of Magento 2 Inline Translation:

  • A non-technical and easy method, add a new translation, without being an expert in translations!
  • A time-consuming method if there are changes to be made in bulk.
  • Magento 2 Inline Translation is theme specific, if you change the store theme, you need to do it again.

That’s all about the easy way out for Magento 2 translations! 

Sanjay Jethva

Article by

Sanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for...