• Resolved hashmoody

    (@hashmoody)


    Hi I am trying to get a site multilingual & everything else is set, I am using .po & .mo for localization & have achieved the language switching by a single href=?lang=en_us & likewise.

    Now the issue is everything else is translated, but not the navigation menus, so I tried getting another approach, i made 2 menus for it, one in english & one in other language i need, now i simply need to know how to show differnent menus if wplang is changed.

    Something like this :

    <?php
    if(defined(‘WPLANG’) == ‘en-US’) {
    echo ‘YES’;
    }
    else if(defined(‘WPLANG’) != ‘en-US’) {
    echo ‘no’;
    }
    ?>

    How can I achieve this ? Any quick ideas ? Thanks very much in advance! Cheers!

Viewing 1 replies (of 1 total)
  • Thread Starter hashmoody

    (@hashmoody)

    Okay, no need for answer: I found the solution, incase anybody else is stuck with the same thing:

    <?php if(strcmp(get_bloginfo(‘language’),’en-US’) == 0) { ?>
    // Do something ….
    <?php } ?>

    Cheers! Case closed!!

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional content with WPLANG.’ is closed to new replies.