Translating themes (including GeoDirectory themes)

This article is about translating your theme, and making sure that your translations are not lost when there is an update to your theme.
The example used is the GeoDirectory Framework Theme, but the instructions apply for all themes.

The first thing you should have done after deciding to use the GDF theme is to use a child theme, this way you won’t lose your changes when the main theme is updated.
You can download both the GeoDirectory Framework Theme and its child theme, and the GDF Modern child theme from your download area.

Let’s get started:

1. Download poedit or check here for alternatives

2. Download the main theme’s  language file to your computer using FTP. For the GDF theme that file is at
/wp-content/themes/GeoDirectory_framework/languages/en_US.po.

3. Open poedit and choose

  1. Edit a translation (if you want to keep your site in US English)
  2. Create a new translation (if you are using any other language for your site)

4. Select the en_US.po from your computer.
You might have to change the type of file displayed from .POT to .PO.

Skip step 5 and 6 if you are not translating to another language, but only editing the US English version.

5. If you are translating to another language, then poedit will ask you what language you want to use for your translation.
For example if you are translating to French you would choose French from the list provided:

6. Save your translated file in the same format as the original language file:
In our example that would be fr_FR.po.

7. Change any of the language strings you want to translate or change.
When you then save the .po file, a .mo file will automatically be created.

8. Upload the .mo file (in our case en_US.mo or fr_FR.mo) to your child theme languages folder.
If there is no languages folder in your child theme just create one.
The result should look like this /wp-content/themes/GDF_child/languages/en_US.mo or /wp-content/themes/GDF_child/languages/fr_FR.mo.

9. If you have not set the language of your website yet, you do that by going to your wp-admin area, and then go to Settings > General > Site language and select your language there.
If your language is not available there, then you can download your WordPress language file here.

10. Go to your homepage and refresh to see your changes :).