How to Keep Translation Active When Updating Genesis

If you’re like me, then English isn’t your first language and chances are you would like to see your Genesis powered website talking to you in your own language. It shouldn’t come to you as a surprise that Genesis is built to be translated and all you have to do is translate the genesis.pot file via a tool like PoEdit.

After uploading the translations to your /lib/languages/ folder in your Genesis folder you can see your translation active on your website. However, when Genesis offers updates, that update process will remove your language files, as it replaces the complete Genesis folder, reverting your site back to English.

Now, Genesis wouldn’t be Genesis if there wasn’t a solution for that. Here’s what you have to do in order to keep your Genesis powered website translated even after updates.

  1. Go to your active child theme folder and create a folder called languages
  2. Upload your translation files (your .mo and .po files) to the languages folder you just created
  3. Next up, we need to tell Genesis we want it to look for translation files in your Child Theme folder instead of the Genesis folder.
    1. We need the following code pasted in your Child Theme’s functions.php:

      //Child Theme Language override
      define('GENESIS_LANGUAGES_DIR', STYLESHEETPATH.'/languages');
      define('GENESIS_LANGUAGES_URL', STYLESHEETPATH.'/languages');

      This snippet needs to go before the following code:

      // Start the engine
      require_once(TEMPLATEPATH.'/lib/init.php');

      but after the opening

      <?php

      That’s it. Now your site will always remain translated. Do keep in mind that a bigger Genesis update (e.g. from 1.3.x to 1.4) there will probably be new untranslated texts in the new Genesis .pot file found in the /lib/languages/ folder.

Speak Your Mind

*

Stop SOPA