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!


Ready to foster your knowledge

with MAGENTO 2 BASIC GUIDE

Is your site still a mess and Magento extensions are not enough to save your site? Save your site with Magento Web Development Services now

magento services


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 *