How to keep your Genesis translations up to date

Genesis Translations

The Genesis framework texts are very easy to translate in any other language. The great plugin Genesis Translations from Remkus de Vries has already most of what you need for your website. But in some cases your customer demands to have customized or formal translations of a language.

Formal versus informal translation

In Germany and sometimes in the Netherlands customers don’t want the informal form of translations.

  • Informal:  English: you, German: du/dein, Dutch: je/jij/jouw.
  • Formal: English: you, German: Sie/Ihr, Dutch: U/uw.

Usually on internet the etiquette goes on informal, but in some profession groups this is not so common. In Germany it is in many cases very uncommon to address your communication partner the informal way.

How to keep it formal

With the help of the free translation program Poedit, and a bit of creativity in your child theme you can make it work.

Remkus de Vries made an awesome Genesis Translations plugin for WordPress, but any update of this plugin would overwrite your customized translations. The following steps give a better control over your translations.

Initial steps

  • Install the Genesis Translations plugin but don’t activate it. You still will be notified on updates. Custom translations probably hold for a whole release (2.0 til 2.99 or so).
  • Create in your child theme folder a folder named languages (if it is not already there)
  • Create in this folder (languages) a new folder named genesis.
  • Copy the language files for your language from the Genesis Translations Plugin languages to the genesis folder you have created in step 3. Copy both the .po and the .mo files you need.
  • Copy the <language>.po file to your computer and make modifications to the <language>.po file with Poedit. Save the file in Poedit.
    The will update the existing .mo file with the same name. Copy the .po and .mo files back to your <childtheme>/languages/genesis folder within your WordPress installation.
  • Now let’s modify the functions.php of the child theme.

Define where Genesis has to take the translations from

Define this after the <?php at the top of functions.php.

Define where your child theme gets the translations from

These are the translations that are specifically for your child theme and don’t match any definitions in the Genesis theme itself.

The following sample is based on the "executive" theme, but that should be replaced by your own theme name.

The way as it is defined above was the only way that it would except my Dutch translations from my child theme. As you can see in the definition, the language files for the child theme itself are in the root of the languages folder.

Large update of Genesis

If the translations don’t match anymore and handwork is required again, just repeat the steps where you copy the files from the plugin until where you copy them back to your languages/genesis folder. You don’t have to update the functions.php again.

Tip

One customer liked to have in the author profile instead of "About <author name>" (in Dutch: "Over <auteurs naam>"), just the name and no "Over". In Poedit you can’t leave a string empty, for it will take the original language text (English).

If the text in the .po file is "Over" and the translation should be empty replace it with ‘<span></span>’. It will not consume any space and it avoids that you have to do extra programming.

Johan van de Merwe
Dedicated to professional software development since 1985. Has worked since 1992 as IT manager in several international operating companies. Since 2007 CEO and Sencha Ext JS web application developer at Enovision GmbH.

Comments

  1. Hashim

    Hi Johan,

    Just a quick question I hope you can help me with.

    I’d like to translate texts produced by WordPress and Genesis for the front-end of the website. But I’d like the back-end of the website to remain in English.

    Is that possible?

    Thank you in advance!

    Sincerely,

    Hashim

    • James van de Merwe

      Hello Hashim,

      Maybe you could add this to your functions.php of your theme:

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.