• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Twitter
  • Facebook
  • Instagram

Remkus de Vries

Curiously Questioning Everything

Menu
  • Blog
  • Updates
  • Newsletter
  • About
  • Contact
  • Remkus de Vries
  • Blog
  • Updates
  • Newsletter
  • About
  • Contact

How to Keep Translation Active When Updating Genesis

Remkus wrote on 29 September, 2010 38 Comments

UPDATE: This tutorial is no longer recommended. It will still work, but you’re most likely much better off with my Genesis Translations plugin.

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.

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 .

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.

Topic: Tutorials

Previous Post: « How to Change the Author Link in Post Info
Next Post: Looking Forward to WordCamp NL 2010 »

Primary Sidebar

Be social, find me here:

  • Twitter
  • Facebook
  • Instagram
Copyright © 2010 – 2022 Remkus de Vries
WordPress hosting by Servebolt