• Hello , i am using the Free polylang plugin.

    in the site that i am develop there is Amount of languages and i am using with IF Conditional like this:

    <?php if (get_locale() == 'he_IL')  { ?>
                      <img src="<?php echo $navLogo['url']; ?>" alt="<?php echo $navLogo['alt']; ?>" title="<?php echo $navLogo['title']; ?>">
                <?php } elseif (get_locale() == 'en_US' || get_locale() == 'pt_PT') { 
                             $englishTitle = get_field('english-title-attr', $navLogo['id']);
    ?>
    

    For meanwhile it is working , however !!! it is unreasonable to add each time for a new language another: || get_locale() == ‘Country_code’ ,

    How am i write the correct one – that every language Except from ‘he_IL’ in the ELSEIF in the code ???

    For your reply and your help i will very very appreciat 🙂

The topic ‘IF Conditionally to languages in the code’ is closed to new replies.