Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #482911

    Hi. i have asked help from wmpl guys on how to implement a custom language switcher to my site. What i wanted is to have a drop down that says “choose your language” instead of displaying the flags or name side-by-side. They have given me a php snippet but due to my limited php knowledge, can’t seem to get it to work. They told me you guys might be able to help me implement this code. the code is this:

    
    function my_custom_switcher(){
        $languages = icl_get_languages('skip_missing=0&orderby=code');
        if(!empty($languages)){ ?>
            <div id="footer_language_list">
                <ul>
                    <li><?php _e('Choose your language', 'text-domain') ?></li>
                    <?php
                    foreach($languages as $l){
                     
                        if( !$l['active'] ){ ?>
                            <li>
                                <a>">
                                    <img />" alt="<?php echo $l['translated_name'] ?>" />
                                    <span><?php $l['translated_name'] ?></span>
                                <a>
                            </li><?php
                        }
     
                    } ?>
                </ul>
            </div><?php
        }
    }
    

    Thanks in advance!

    • This topic was modified 9 years, 4 months ago by nbfc.
    #482995

    Hi nbfc!

    You can contact one of our Customization Contractors, who will help you out with the process.
    http://kriesi.at/contact/customization

    Let us know if we could do anything else, regarding our theme

    Cheers!
    Basilis

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Add custom wpml language switcher’ is closed to new replies.