I am having trouble using the magento i18n:collect-phrases command to collect phrases for translation.

When I use:

php bin/magento i18n:collect-phrases -o "/app/i18n/test/xx_YY/dictionary.csv" -m

I get the error message:

[RuntimeException] Not enough arguments

When I try to specify a location where to find phrases:

php bin/magento i18n:collect-phrases -o "/app/i18n/test/xx_YY/dictionary.csv" /vendor/magento

I get the error message: [InvalidArgumentException] Specified path doesn't exist

I get the same message (Specified path doesn't exist) whichever path I chance the last part of the command into (app/design/frontend.... etc).

I took one csv file from one of the module categories, translated that into my language and tried to upload it using

php bin/magento setup:static-content:deploy 

This worked and showed translation on the frontend as well. But it doesn't have all the phrases and if I add phrases to that file manually, it does not show those phrases on the storefront.

The website that uses Magento is an addon domain, so the server category structure is:

/home/Maindomain/addondomain/app, bin etc.

Could this be the reason why I am not able to collect phrases for translation?

Any help would be greatly appreciated.

1 Answer 1


Your file /app/i18n/test/xx_YY/dictionary.csv should be have four columns

  1. The value of Translate
  2. The value should be translated with this.
  3. Module used simply module
  4. Module Name of that particular translator e.g. Magento_Catalog


Save Category Save Category New module Magento_Catalog


[InvalidArgumentException] Specified path doesn't exist

for this, you have to collect translate variable from Magento2 Root


php bin/magento i18n:collect-phrases -o "/app/i18n/test/xx_YY/dictionary.csv" Magento2ROOT/

instead of

php bin/magento i18n:collect-phrases -o "/app/i18n/test/xx_YY/dictionary.csv" /vendor/magento

it will help you.

  • Thank you! It did work! I will just add that just Magento2ROOT/ at the end of the code produced a file with two columns, but -m Magento2ROOT/ produced the right file with four columns. Feb 20, 2017 at 18:33
  • yes for that you have to create two more column e.g. Save Category Save Category New module Magento_Catalog so. you have to create module and Magento_Catalog columns Feb 21, 2017 at 4:45
  • when you try php bin/magento i18n:collect-phrases -o "/app/i18n/test/xx_YY/dictionary.csv" Magento2ROOT/ in magento 2.0 you will get all four column but for magento 2.1 i dont know why its taking only 2 column. Feb 21, 2017 at 4:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.