As an extension developer sometimes, it seems a hectic task to create the translation file in magento1 as we need to create the translation csv file manually, but in magento2 you can use magento command line tool to generate the translation csv for your module automatically, I am adding this article because many developers still create translation files manually.
php bin/magento i18n:collect-phrases --output=”/directory-to-generate-out/locale_name.csv” /path-to-your-module-directoy
in the above command :
–output flag is used to show the destination of the csv file to be generated, and if you do not pass the –output param then the output is generated on the terminal.
and the last param is to tell for which module you want to create the translation csv .
You can learn more about it from magento2 devdocs
Hope this can help you .
Thanks 🙂

Be the first to comment.