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
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
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 pathapp/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.