Support » Plugins » Hacks » Change language at runtime

  • Hi there,

    I was wondering if anyone could help me.. I created a small site and it has 2 languages.. To devide the posts, I simply give them a different language-category…

    To determine which images to put I simply do a check, for example:
    ” <?php if (in_category(‘fr’)) { ?>”. You get the idea..

    Now, that leaves me with one problem.. I’d like to switch the wordpress language on runtime also.. but I can’t seem to find how?
    Is it possible at all?

    I’d like to somehow do it when the page is being loaded:
    Something like:
    <?php if (in_category(‘fr’)) {
    define(‘WPLANG’, ‘fr_FR’);
    ?>

    Any help would be much appreciated!

    thanks in advance,

    Ben

Viewing 3 replies - 1 through 3 (of 3 total)
  • JGeo

    (@jgeo)

    I am looking for the same thing. Can’t get it to work.

    Andrew Bartel

    (@andrew-bartel)

    Did you try that? It might work assuming you have the MO file installed.

    JGeo

    (@jgeo)

    Maybe I didn’t put the lines in the right place. Which file/location (Twentyten theme I’m using) should I paste the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change language at runtime’ is closed to new replies.