Reading list Switch to dark mode

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

    Updated 18 August 2021

    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

    Searching for an experienced
    Magento 2 Company ?
    Find out More

    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!!! 🙂

    . . .

    Leave a Comment

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


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home