• Resolved meltcore

    (@meltcore)


    On my multilingual, multisite setup I’m trying to have multiple single.php, based on which blog it is destined to. My idea, based on a trick I found here on these forums, was to do something a little bit like the code pasted down here, but it won’t work (no matter the ICL language I try it on, it always give me the “else” one).

    <?php
    $post = $wp_query->post;
    if (get_locale() = 'fr') { include (TEMPLATEPATH . '/single-fr.php');
    }
    else { include (TEMPLATEPATH . '/single-other.php');
    }
    ?>

    Is there any other way I could detect the language of the current site? Any idea how to make this work?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Detect blog language?’ is closed to new replies.