skip to Main Content

I am trying to translate the “Go to Checkout” of Magento 2. If I place the file in /vendor/magento/module-checkout/i18n/de_DE.csv it works. Content of de_DE.csv:

"Go to Checkout","Zur Kasse"

But this seems as a bad idea as adding/changing stuff in /vendor is bad practice at least.

I have tried to place it practically everywhere, but no luck…

2

Answers


  1. You can achieve the same by overriding it in your custom theme like given in below example. More over doing the changes in the vendor/magento is not advisable.

    app/design/frontend/{{Vendor}}/{{Theme}}/i18n/de_DE.csv

    Once all the translations are set save the file and run the below given command in the terminal.

    Clear cache (bin/magento cache:clean) and check your changes.

    Hope this will make your day!.

    Thanks

    Login or Signup to reply.
  2. You can add your csv file in app/i18n/vendorname/modulename, it will get translated everywhere the site., In your case you are saying that tried with place the translated file in vendor..So you can just override that in your custom theme too..Like path app/design/frontend/VendorName/CustomModuleName/Magento_Checkout/i18n/.csv,

    And run the commands like upgrade deploy compile if it is necessary..
    And clean cache too..

    Hope this will help.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search