Magento 2 - How to generate translation strings for your magento project

If you have want to create a multi-language store then you may require to translate all English strings into the language of your choice. For this you will need accumulate all of the eligible strings for translation into a CSV file. In this article we will discuss how to generate this list of strings from your Magento project which are eligible for translations.

Magento allows the list generation with following command:

For Whole Project:
php bin/magento i18n:collect-phrases --magento -o translations.csv
cat translations.csv
For A Particular Module:
php bin/magento i18n:collect-phrases path/to/my/module -o translations.csv
cat translations.csv
Thenafter, this CSV file (translations.csv in above example) can be translated either manually or using third party translator extensions like Qordoba.

Comments

Popular posts from this blog

Magento 2: How to create new indexer for your custom module

Xdebug - PHPStorm - Ubuntu: How to configure Xdebug on Ubuntu for PHPStorm

Magento 2 - Vue Storefront PWA Integration: How to create a new VSBridge indexer job and Elastic Index for your custom module