How to change wording and text with Poedit

It is often useful to be able to change the text or wording of something in Event Espresso in order for it to fit in with your site and audience better. You can hunt through the code to find the strings (text) to replace but there is a much, much easier and recommended way: use Poedit to change the language files.

What happens is you take the language file (in this example we will work with US English) and translate it, in order to change the text.

1) We recommend downloading and installing Poedit for working on translation files.

2) After you install Poedit, you can download a copy of the event_espresso-en_US.po file from our Github repository. Then you can open it in poedit.

Githubs downloading methods are not intuitive:

To download the PO file – left click the link on the main page and then right click the Raw button in the top right of the page that comes up and save as.

To download the MO file – left click the link on the main page, and then left click the View Raw text link in the middle of the page that comes up.

If you don’t do this you may end up with a MO and PO file that contains garbage data and the language wont work.

3) Use the Find tool to pull up the text string you need to modify.

4) Change the string as shown:

poedit

5) Save, then upload the newly generated .mo file to the wp-content/uploads/espresso/languages directory on your server.

6) Keep a copy of the modified language files saved somewhere in case you need to re-edit it or re-upload it.

7) Edit your wp-config.php file. Where it says

define('WPLANG', '');

change it to

define('WPLANG', 'en_US');

Obviously if your main language is not American English it is likely that this has already been changed to the correct language but you may need to check, especially if your changes are not occurring.

Changing text strings by using a plugin or a custom function

If you know the exact text string you need to re-word, you can alternatively use the Quick Localisation plugin that can be downloaded here for free:

http://wordpress.org/plugins/quick-localization/

Quick Localisation

Or you can add a custom function to your theme’s functions.php file or the custom_functions.php file that is included with Event Espresso’s Custom Files add-on. Example code follows:


Need more help?

  • Browse or search for more information on this topic in our support forums. Customers with an active support license can open a support topic and get help from Event Espresso staff.
  • Have an emergency? Purchase a support token and get expedited one-on-one help!
  • Go back to documentation for Event Espresso
Event Espresso - Staging Server