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

XDebug - PHPStorm - Mac: How to configure Xdebug with PHPStorm on Mac OS and PHP 7.3

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