WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read a lot about what is the optimal to translate your website (french and english in my case)

I set up a Multi site where I created two site one french mywebsite.com/fr and one in english mywebsite.com/en

I am now in the process of translating my theme(in french by default) I added this to my theme function.php:

load_theme_textdomain('INTERluminaires', get_template_directory() . '/languages');

then modified my template files in order to be able to translate some text

<?php _e("Design et conseils", "INTERluminaires"); ?>

created a po and mo file with poedit, everything goes well.

I uploaded those files in my theme folder /languages

those files are named en_CA.po and en_CA.mo (I tried INTERluminaires-en_ca.po and mo to no avail)

when I change my theme language in settings general and refresh my website nothing is translated.

any idea what could be wrong here?

btw I managed to translate a plugin I installed without any problem.

share|improve this question
up vote 2 down vote accepted

You have incomplete code. You register your Theme's textdomain, but don't actually tell WordPress to load your translation files.

To this:

load_theme_textdomain('INTERluminaires', get_template_directory() . '/languages');

Add this:

$locale = get_locale();
$locale_file = get_template_directory() . "/languages/$locale.php";
if ( is_readable( $locale_file ) ) {
    require_once( $locale_file );

Or, altogether (and wrapped properly in a callback):

function wpse49326_translate_theme() {
    // Load Theme textdomain
    load_theme_textdomain('INTERluminaires', get_template_directory() . '/languages');

    // Include Theme text translation file
    $locale = get_locale();
    $locale_file = get_template_directory() . "/languages/$locale.php";
    if ( is_readable( $locale_file ) ) {
        require_once( $locale_file );
add_action( 'after_setup_theme', 'wpse49326_translate_theme' );
share|improve this answer
Thanks, in fact it works without it. but I'll add it to make sure I was so into my translation that I forgot to upload index.php (rookie mistake!) hence why it was not showing. – Francis Thibault Apr 18 '12 at 18:19
Do you maybe know why Twenty Thirteen doesn't include the second part of this code (with get_locale() and require_once())? – Paul Jun 8 '13 at 10:43
Chip, I realize this is an old question. Doesn't load_theme_textdomain() call load_textdomain() internally and then requires it by itself and merges it with the global array? – kaiser Sep 12 '13 at 13:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.