Posted on by

Changing the Labels in Participants Database

I often get asked if it’s possible to change the labels used by the Participants Database plugin, including the name of the plugin.

This is possible because nearly all the text is processed through a translation file which can be edited to “translate” the plugin text to anything you want.

Here’s how to do that

The first step is to install a translation file editor on your computer. I use Poedit on my Mac, but there are several to choose from for different platforms. This article on WordPress.org explains how to do this.

Now, in the plugin, in a directory named “languages” are all the translation files. Using FTP, download the file for your language to your own computer. Make a copy for backup, then open the original in the translation editor.

Finding Your Translation File

To find the translation file to edit, you need to know the language code for your language. If you don’t know the code, check the WordPress Locales page to find it. Once you know the code, the plugin language file will have that code in it. For instance, if your language is Danish, the code is “da_DK” so your language file is participants-database-da_DK.po. That file will be found in:

wp-content/plugins/participants-database/languages/participants-database-da_DK.po

Creating a New Translation

If no file exists for your language, you can create a new one in the translation file editor. Start by opening the language template file participants-database/participants-database.pot in your translation editor to create the new translation. The editor will provide a way to do this. You’ll need to know the correct language code.

Once you’ve opened the translation file in the editor, you can search for the words you want to change. If there is more than one string that matches and you don’t know which one to change, you can check the context of the string, which tells you which script the text is from. That can give you a clue as to where the text is seen. Most of the time, it doesn’t matter, you can just change them all.

Saving your changes

Once you’ve made all your changes, save the file. This will create a new .mo file in the same location as the language file you edited. Now, you’ll need to upload the two files to the plugin to make the change complete: the .po file and the .mo file ( which contains the binary data the plugin uses to generate text) for your language.

For your changes to persist through plugin updates, you need to upload your translation files to the WP languages directory. The plugin will look there first for language files, overriding any language files in the plugin itself. Upload the files to a directory named “participants-database” in the general languages directory. For most WP installs, that will be in this location:

/wp-content/languages/plugins/participants-database/participants-database-LOCALE.mo

“LOCALE” will be replaced by the current locale value, which identifies the language you are using for your site. This is normally set in the general settings. With that in place, the plugin will use your edited translation files. The locale string will be something like “en_US” (American English), “pt_BR” (Brazilian Portuguese), etc., so if your language is Brazilian Portuguese, the files you will save are:

/wp-content/languages/plugins/participants-database/participants-database-pt_BR.mo
/wp-content/languages/plugins/participants-database/participants-database-pt_BR.po

If you are multilingual and would like to contribute a new (or updated) translation to the plugin, please contact me, I welcome the contribution!

3 thoughts on “Changing the Labels in Participants Database

  1. I attempted this and the wording I would like to change does not appear in the .po file.
    Working with en_US and searching for “If you have an account, it is strongly recommended that you login before you sign up so that you can view and edit all your signups.” We would like to remove this as we do not have logins and it is confusing to users. The text comes from the actual sign up page. The one where you enter your First Name, Last Name, E-mail and Confirm E-mail.
    Suggestions?

    1. Hi Jim,

      This text is not part of Participants Database. I’m guessing it’s in the content of your signup page, or possibly in the template.

      1. Roland,

        Thank you for your quick and accurate response. I hate to say this but I asked the question on the forum for the wrong plugin. Yours works great!

        Jim

Leave a Reply
You have to agree to the comment policy.

3 thoughts on “Changing the Labels in Participants Database

  1. I attempted this and the wording I would like to change does not appear in the .po file.
    Working with en_US and searching for “If you have an account, it is strongly recommended that you login before you sign up so that you can view and edit all your signups.” We would like to remove this as we do not have logins and it is confusing to users. The text comes from the actual sign up page. The one where you enter your First Name, Last Name, E-mail and Confirm E-mail.
    Suggestions?

    1. Hi Jim,

      This text is not part of Participants Database. I’m guessing it’s in the content of your signup page, or possibly in the template.

      1. Roland,

        Thank you for your quick and accurate response. I hate to say this but I asked the question on the forum for the wrong plugin. Yours works great!

        Jim

Leave a Reply
You have to agree to the comment policy.