0

I need to change the text on an item in a 3rd party extension from "Apply" to "Redeem". Since Apply is used in other modules as well I want to make sure to only affect instance of "apply" in the module specifically.

In Magento 1 this could be done using the line below in the theme's translation file...

"Module_Name::Apply","Redeem"

I tried this in Magento 2 and it does not seem to work and I didn't see any mention of an alternative in the Magento Translate Docs. Is there a way to accomplish this in Magento 2?

1

This can be done by creating an independent language translation file inside your 3rd party extension (custom module).

First create i18n directory inside your custom module
Then create a language file and name it en_US.csv
Inside that language file put your translation

Apply, Redeem

Save it then run cache:flush

It should translate only the specific 'apply' from your custom module and will not affect any other module using the 'apply' instance

check if it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.