Here are  3 steps for you to know How to Get all Translation Labels from PHP and JS Files of Magento 2 Extension:

  • Step 1: Translate label structure in php files
  • Step 2: Translate label structure in js files
  • Step 3: Write generator labes function
Get all Translation Labels from PHP and JS Files
Get all Translation Labels from PHP and JS Files

Step 1: Translate label structure in php files

  • We use default translate label struct of magento 2. Example:

echo __(‘Hello Everyone’);

Step 2: Translate label structure in js files

  • We should use this structure:

Step 3: Write generator labes function

File directory: xampp/htdocs/translation/translatelabel.php

The steps I mention above is the shortest process for you to Get all Translation Labels from PHP and JS Files of Magento 2 Extension.

Thank you for reading this post and see you in other posts from Magestore!

We also contribute great content of Magento Tutorial for Magento 1.x.

DON'T MISS THE CHANCE!

magento tutorial

How to Remove Block Depending on a Config Setting
How to Disable Requirejs Cache in Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *