Question

I'm hitting my head against a wall on this one. I've gone through not only the Magento documentation regarding custom translations in themes, but also many answered questions found via Google, and nothing seems to work. I'm trying to change the default "transaction has been declined" message during checkout.

I have a theme located at app/design/frontend/Vendor/ThemeName. Inside that theme, I have the i18n directory, and inside of it, I have en_US.csv.

In app/design/frontend/Vendor/ThemeName/i18n/en_US.csv, I have the following text:

"Transaction has been declined. Please try again later.","Payment was declined. Please check your details and try again.",module,Magento_Payment

I've also tried just this:

"Transaction has been declined. Please try again later.","Payment was declined. Please check your details and try again."

In addition, I've even tried moving i18n to app/code/Vendor/ThemeName/Magento_Payment.

And, of course, I'm flushing the cache and making sure all static content gets rebuilt.

Nothing works. This is maddening, and I'm really hoping I've just missed something stupid and obvious that someone can point out to me very quickly :)

EDIT: I erroneously stated that my theme was installed in app/code when it was in fact installed in app/design/frontend.

No correct solution

OTHER TIPS

Themes manually installed (not via composer) reside under

app/design/frontend/<your_vendor_name>/<your_theme_name>.

e.g. app/design/frontend/Magento/luma

This is documented in the dev guide and can also be seen in the official Magento 2 github repository here

app/code/ is reserved for modules

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top