Back to Top

How to create translation csv in Magento2

Updated 6 March 2024

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

Searching for an experienced
Magento 2 Company ?
Find out More

Hope this can help you .

Thanks 🙂

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home