How to get i18n Directory path of a module using Magento 2?

i18n folder in module useful for translation purpose in Magento 2 for multiple languages.

You can add a translated CSV file at the module or theme level under the i18n folder. The website has multiple languages and you want to translate the text to a specific locale of the store, you need to create a CSV file for respective language locale like en_US.csv, fr_FR.csv file. Continue reading “How to get i18n Directory path of a module using Magento 2?”

How to Get Module’s view directory image or js full path using Magento 2?

You can retrieve the full path of Module’s static asset like Images, Javascript or CSS file path using Magento 2.

If you want to get the full path of view directory for frontend or backend area, You need to use Magento\Framework\View\Asset\Repository class to achieve the task. Continue reading “How to Get Module’s view directory image or js full path using Magento 2?”

How to resolved WARNING | Unescaped output detected of GrumPHP Magento 2.

When you use GrumPHP code sniffer tool to commit your code for the project to follow Magento Coding Standard.

GrumPHP is the Automatic Code Quality Checker tools for PHP based applications.
Continue reading “How to resolved WARNING | Unescaped output detected of GrumPHP Magento 2.”