Magento 2: The command bin/magento i18n:collect-phrases does not work












2














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.










share|improve this question
















bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    2














    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.










    share|improve this question
















    bumped to the homepage by Community yesterday


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      2












      2








      2







      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.










      share|improve this question















      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.







      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 3 '17 at 3:37









      Manoj Deswal

      4,27581742




      4,27581742










      asked Feb 20 '17 at 13:33









      tereolenevatereoleneva

      112




      112





      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community yesterday


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          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


          e.g



          Save Category Save Category New module Magento_Catalog



          AND



          [InvalidArgumentException] Specified path doesn't exist


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



          use



          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.






          share|improve this answer























          • 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.
            – tereoleneva
            Feb 20 '17 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
            – chirag
            Feb 21 '17 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.
            – chirag
            Feb 21 '17 at 4:46











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160802%2fmagento-2-the-command-bin-magento-i18ncollect-phrases-does-not-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          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


          e.g



          Save Category Save Category New module Magento_Catalog



          AND



          [InvalidArgumentException] Specified path doesn't exist


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



          use



          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.






          share|improve this answer























          • 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.
            – tereoleneva
            Feb 20 '17 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
            – chirag
            Feb 21 '17 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.
            – chirag
            Feb 21 '17 at 4:46
















          0














          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


          e.g



          Save Category Save Category New module Magento_Catalog



          AND



          [InvalidArgumentException] Specified path doesn't exist


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



          use



          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.






          share|improve this answer























          • 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.
            – tereoleneva
            Feb 20 '17 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
            – chirag
            Feb 21 '17 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.
            – chirag
            Feb 21 '17 at 4:46














          0












          0








          0






          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


          e.g



          Save Category Save Category New module Magento_Catalog



          AND



          [InvalidArgumentException] Specified path doesn't exist


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



          use



          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.






          share|improve this answer














          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


          e.g



          Save Category Save Category New module Magento_Catalog



          AND



          [InvalidArgumentException] Specified path doesn't exist


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



          use



          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 14 '17 at 9:23

























          answered Feb 20 '17 at 14:15









          chiragchirag

          2,0571830




          2,0571830












          • 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.
            – tereoleneva
            Feb 20 '17 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
            – chirag
            Feb 21 '17 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.
            – chirag
            Feb 21 '17 at 4:46


















          • 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.
            – tereoleneva
            Feb 20 '17 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
            – chirag
            Feb 21 '17 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.
            – chirag
            Feb 21 '17 at 4:46
















          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.
          – tereoleneva
          Feb 20 '17 at 18:33




          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.
          – tereoleneva
          Feb 20 '17 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
          – chirag
          Feb 21 '17 at 4:45






          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
          – chirag
          Feb 21 '17 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.
          – chirag
          Feb 21 '17 at 4:46




          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.
          – chirag
          Feb 21 '17 at 4:46


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f160802%2fmagento-2-the-command-bin-magento-i18ncollect-phrases-does-not-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          An IMO inspired problem

          Management

          Has there ever been an instance of an active nuclear power plant within or near a war zone?