Trouble translating plugin

I would like to customize some of the phrases and language in the marketplace plugin to better suit my project i.e. changing the word ‘add to cart’ to ‘save this’. And while I’ve been barking up the right tree so far I have yet to have an positive results. As of now I’ve generated a .po and .mo file (using POedit) and added translations to the strings like ‘add to cart’ and saved those files in the the marketpress plugin directory but no luck. I’ve even tried to change the mp-default.po file in POedit as no results. What am I missing? Do I need to have wp-config file specify a language or can I leave it as default? What am I missing? I working on a MAMP server but I don’t see how that would effect it. Feedback is appreciated in advance!

  • Philip John
    • DEV MAN’s Apprentice


    Translations can be tricky when you first get started with them but once you’ve got it sorted it’s pretty easy :slight_smile:

    You’ve done the hard part by the sounds of it so, what are the names of your new .mo and .po files and where have you placed them?

    They need to be called where “en_US” is the language/country code you’ve set in the “WP_LANG” define in wp-config.php

    Then, you need to place them in /wp-content/plugins/marketpress/marketpress-includes/languages/



  • ChrisFM
    • New Recruit

    O.k. that did the trick. Thanks. I knew there was something I was missing.

    I will add this note to assist anyone who may have the similar confusion:

    When translating a plugin the plugin gets the information on what language to translate to from within the wp-config file. But within the wp-config file there is a comment that indicates the language file must be present in the folder wordpress>wp-content>languages but this folder is empty (by default I assume). So I though “uh, how can I indicate file that doesn’t exist” but in this case en_US is the default. So I didn’t need to have a language file I just need to make sure the default language had a file representing it from within the plugin languages subfolder.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.