Menu Close
    Searching for an experienced Magento 2 Development Company ?

    How do add translation content for a specific custom module in Magento 2?

    Sometime you need to change the text on any content in our extension from “Add Content” to “Add Post“. Since Add Content is used in other modules as well I want to make sure to only affect instance of “Add Content” in the module specifically.

    You can use “Add Content“, “Add Post“, module, Module_Name

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

    Example in devdocs

    This will help to create an independent language translation file without conflict with third 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

    That’s all

    If any issue or doubt please feel free to mentioned in comment section.

    I would be happy to help.

    Happy Coding!!! 🙂

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top