Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #12667

    WPML supports only one widget since that is it possible to have the WPML language selector on the header i think in the sub menu instead of the social icons and the rss i got the code from their forum but no idea how to implement

    Language selector with flags only

    Simple function for displaying flags linked to the translations of the current page.

    function language_selector_flags(){

    $languages = icl_get_languages(‘skip_missing=0&orderby=code’);


    foreach($languages as $l){

    if(!$l) echo ‘‘;

    echo ‘'.$l.'‘;

    if(!$l) echo ‘‘;




    The output of this function needs to be styled separately. For instance placing the function into a div block and defining custom styles for the img tags.

    <div id=”flags_language_selector”><?php language_selector_flags(); ?></div >

    The CSS:

    #flags_language_selector img{


    border:1px solid #333;




    You need to add this line:

    <div id="flags_language_selector"><?php language_selector_flags(); ?></div >

    to header.php – I’d add it to the menu container div.




    When i add this line after the <!– end social_bookmarks–> the theme stops working i just see the submenu i tried adding it some other places like main menu container as well same issue


    Did you try to contact the plugin authors? I see no reason why the theme crashes if you add this code to the html code. You just need to make sure that it’s not used as php code between the <?php and ?> marks.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘WPML Language Selector in Shoutbox Header’ is closed to new replies.