How to Change Wording and Text with POedit

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 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 GlotPress project. Then you can open it in Poedit.

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, the custom_functions.php file that is included with Event Espresso’s Custom Files add-on (EE3 only), or your own custom site specific plugin. Example code follows:


Need more help?

Do NOT follow this link or you will be banned from the site!