How to Translate Event Espresso
Translating Event Espresso into your language will make registration easier for your native speakers (e.g., attendees/registrants), which can lead to more registrations for your events. If Event Espresso already has a translation file for your language, it should be applied automatically.
In this guide, we'll show you how to load a custom translation for Event Espresso.
Important Note:
Multiple languages at the same time is not supported so Event Espresso cannot be used with WPML or Qtranslate.
Before we get started, let's look at a few terms that will be used throughout this guide:
WP dashboard - this is the WP-admin for your WordPress site.
Your language - this is your local language that you want to translate Event Espresso into.
GlotPress - holds different translation projects for Event Espresso.
PO file - this holds translation strings that are translated via tools like POedit or GlotPress, this is the file used to generate a MO file.
MO file - this is the translation file used by your Wordpress site. It holds the 'machine code' for the translation strings.
LocoTranslate - this is a plugin used to manage translation files and/or edit translations.
POedit - a software program for editing PO files and creating MO files
Setting your site language
Login to your WordPress dashboard (WP-admin) and go to Settings --> General. Next, scroll down and locate the Site Language option, which appears towards the end of the page. Now change it to your language. For example, if you wanted your site to appear in French, then select that language from the dropdown menu and save changes by clicking on the Save Changes button.
Note that the language that is selected here will be the language that you will set up Event Espresso to use. You cannot use one language for your site and then a different language for Event Espresso. For example, if your WordPress site is set to French, then Event Espresso will also use the French language.
Loading custom translations for Event Espresso with Loco Translate
Using the Loco Translate plugin is our recommended method for managing translations within Event Espresso.
Step 1- Install and activate Loco Translate within WP Dashboard -> Plugins -> Add New.
Search for Loco Translate in the search field and click to install and then activate.
Step 2 - Open up Event Espresso within Loco Translate. Go to WP Dashboard -> Loco Translate -> Plugins -> Event Espresso
Loco Translate will display any translation files for Event Espresso that are saved on your server, in this example we only have French. Click on the language you want to edit translations for.
Loco Translate will load the translation file within POEditer on your Wordpress site, however, the file is currently saved within the plugins own language directory and will be overwirtten each time Event Espresso updates, so we need to relocate the file to an update safe location, we do that with the 'Relocate' button:
Select 'Other' and select the /uploads/espresso/languages/event_espresso-{locale}.po option (that is a custom location Event Espreso sets Loco Translate to use for the cutom files), then click 'Move Files'
Loco Translate will take you back to the Languages screen after moving the files. Click to edit the language again, you will now see the file is loading from the 'other' location at the top of the page:
You can now make changes within the POEditor shown above to customise the translations, should you need to. Here is an example of changing the 'Evénements' string used within the Event Espresso dashboard menu:
See the updated string:
Note - Loco Translate will continue to find the default Event Espresso translations files within the plugin itself and show them within the languages available under the 'Author' folder. After doing the above, if you want to make changes to translations, you should always use the files loading in the 'Other' folder:
Keeping Translations Up-to-date
When new software is released, such as a major version of Event Espresso, new translation strings may be introduced. Prior to releasing the new software, we will update GlotPress which holds language files for Event Espresso. You can get the latest files by following these steps:
- Go to our GlotPress project and get the latest PO and MO for your project (see section: Translate with GlotPress)
- Rename the files so they have the correct file names.
- Rename your existing language files on your site by adding an extra letter or number to the end of the filename. This step will deactivate the files and is a safer option than overwriting or deleting them.
- Upload the newest PO and MO files that you recently downloaded and renamed.
Event Espresso will then start using the new language files that are in place.
Troubleshooting
Did you follow this guide and things still aren't working? Don't worry, we'll help you get back on track.
First, double-check that you are using a current version of Event Espresso.
Next, ensure that your site language matches the language that you are trying to use with Event Espresso. For example, if your site language (a setting in your WP dashboard) is set to French, then Event Espresso must use the translation files (i.e. PO and MO file) for French. Event Espresso is not compatible with multi-language tools like WPML or qTranslate.
If things still are not working, then double-check the upload location and the filenames. The upload location for your PO and MO files should be:
/wp-content/uploads/espresso/languages
The filenames for your PO and MO files should be event_espresso-{locale}.po and event_espresso-{locale}.mo
If you are still not successful with getting your translations working, then please open a support ticket so we can help you. Be sure to let us know any troubleshooting steps that you have already tried.
Additional Resources
Translation teams on WordPress.org
How to Internationalize your Plugin