11

Suppose, I want to translate Shop By to Shop in my custom theme using translation file en_US.csv

What is the method or procedure to achieve it in Magento2?

2 Answers 2

17

You have to just override the en_US.csv file into your theme i18n folder.

app/design/frontend/{Vendorname}/{themename}/i18n/en_US.csv
6
  • 1
    This doesn't work with custom child theme of custom parent theme. For instance, if you create a custom theme FOO with blank theme as parent, and then BAR theme with FOO theme as parent, the csv of BAR will override the csv of FOO, inheritance will not work.
    – DevonDahon
    Commented Nov 6, 2017 at 15:06
  • This is for only frontend, how to do this for admin and frontend both?
    – Newbie
    Commented Dec 21, 2017 at 8:08
  • This is not working for a particular string. "Coupon code is not valid" which is present in module-quote. Any input?
    – Sejal Shah
    Commented Sep 27, 2018 at 11:20
  • @Rakesh, It's not working. Magento version: 2.3.2
    – Siva
    Commented Aug 5, 2019 at 11:38
  • @SejalShah - same issue 'Coupon code is not valid' is not translating. How to fix that? Commented Sep 26, 2019 at 10:29
12

Create a en_US.csv file in this path.

app/design/frontend/Vendor/Theme/i18n/en_US.csv

Put your changes in this file.

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

1
  • Do I only the changes in this folder, or do I copy it all and then edit? If only changes, then this could be "extending" not "overriding" as the other answer suggested? Commented Dec 20, 2019 at 0:03

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.