How to Override a Translation for a Specific Module in Magento 2

localisationmagento2

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?

Best Answer

You can use "Apply", "Redeem", module, Module_Name

Example in devdocs

"Add to Cart", "Add to Cart", module, Magento_Review

"Add to Cart", "Add to Shopping Cart", module, Magento_Catalog

Related Topic