Viewing 4 posts - 1 through 4 (of 4 total)
  • #206328
    elecsander
    Member
    Post count: 17

    Hello,

    in WPML Plugin you can change the layout of the language menu.
    You can do a dropdown, or a horizontal/vertical list. with/without flag, with/without language name.

    But in your theme there is only a dropdown list, actually on my site it shows [Flag + Language Name].
    But I have just two languages and just need two flags side by side. Just simple.

    So I found in your file sf-header.php this code

    /includes/swift-framework/sf-content-display/sf-header.php
    line 541

    			if ($show_translation) {
    $aux_links_output .= '<li class="parent aux-languages"><a href="#">'. __("Language", "swiftframework") .'</a>'. "\n";
    $aux_links_output .= '<ul id="header-languages" class="sub-menu">'. "\n";
    				if (function_exists( 'language_flags' )) {
    				$aux_links_output .= language_flags(); 
    				}
    				$aux_links_output .= '</ul>'. "\n";
    				$aux_links_output .= '</li>'. "\n";
    			}

    And this is the php shortcode of the original WPML Plugin:
    <?php do_action(‘wpml_add_language_selector’); ?>

    How can I fix it? I want the original WPML plugin language menu.

    This code below works, but the menu is shown on the left side of the header:

    			if ($show_translation) {
    				$aux_links_output .= do_action('wpml_add_language_selector');
    			}

    Best regards!

    #206799
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Can you post a link to your site, looks like you just need some CSS to amend the output position?

    Thanks,
    David.

    #211674
    elecsander
    Member
    Post count: 17

    Thanks. I did’t the solution above. Because after one update everything is overwritten.
    I solved my problem by CSS in my child-theme:

    #header-languages .current-language, nav .menu ul.sub-menu li:hover > a {
    background: none!important;
    opacity: 1.0;
    }
    #header-languages a {
    opacity: 0.5;
    }
    .language.name {
    display: none;
    }
    #header-languages > li > a, #header-languages > li > div {
    display: block;
    padding: 1px 0;
    white-space: nowrap;
    }
    #header-languages.sub-menu {
    background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
    display: inline-block !important;
    min-width: 60px !important;
    opacity: 1 !important;
    width: 60px !important;
    }
    .parent.aux-languages > a {
    display: none;
    }
    .header-menu .menu > li.parent::after, .top-menu .menu > li.parent::after {
    display: none;
    }
    #header-languages > li {
    display: inline-block;
    float: left;
    width: 28px;
    }

    #211691
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I am glad that you managed to resolve the issue.
    Thanks
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register