- All our plugins and themes are in English by default, but all of them come with .po files.
- .po files are the standard way WordPress themes and plugins are translated, or the files can just be used to change the wording used by default for English language sites.
- There are many programs you can use to edit these .po language files but we recommend using Poedit.
- Translation programs like Poedit create a matching .mo file when a .po file is translated.
- It is those .mo files that contain the translated language strings to show the translations on your site.
- You can find some ready made translations in our languages project, find out more here.
We will translate the core GD plugin here, but the process is the same for all plugins and addons.
Translating themes also follows the same process except for the location where you should upload the .mo file.
- Download POedit and install the program on your local machine (you only need the free version, but the paid version will assist translations with suggestions).
- Using FTP or your host’s control panel, download the plugins default .po file to your local machine:
- Open the Poedit program and select Create new translation:
- Navigate to the .po file you downloaded at step 2, and open the file:
- Poedit will ask you to select the new language:
- Make sure to select exactly the same language you have at WP > Settings > General:
- Now save the file:
- Poedit will give you the correct extension, in our example that will be nl_BE.po.
- Make sure that the rest of the filename saved is the same as the original .po file, in our example that will be geodirectory-nl_BE.po.
- You will need to upload the newly created files to /wp-content/languages/plugins/ on your server, so we suggest you save it to a copy of the same folder on your local machine to make
- You will see that Poedit creates 2 files: geodirectory-nl_BE.po and geodirectory-nl_BE.mo
- Now translate any language string you want, and save the file once finished:
- When you are ready, upload both the .mo and .po file to the /wp-content/languages/plugins/ folder on the server.
Create the folder if it does not exist yet:
- Go to your website and refresh to see your changes 🙂