Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #1153727

    Hello dear Krisi team,
    I work with WPML, and would like to integrate the language switcher (DE / EN) See screenshot next to the burger menu. Would it be possible? In addition, the active language should be underlined.

    Thank you in advance

    Best regards
    Jürgen

    #1154752

    Hey Jürgen,

    Please speak with the plugin developers.

    Best regards,
    Basilis

    #1155580

    Hi Basilis,
    I have integrated the custom language switcher into WPML. and integrated the code from your support into the child functions.php. I’m not a programmer though. Can you tell me how I can integrate that so that it is presented as in the attached screenshot?
    The Languageswitcher is now under the logo “WERUM” on the left, but I would like to have it right next to the Burger menu.

    Best regards,
    Jürgen

    #1155623

    Hi Basilis,
    I found this in the enfold documentation. Is it possible to add second menu to the burger menu on left side? I think that would be the solution to my problem!

    /*————————*/
    /* Add word menu next to hamburger icon
    /*————————*/
    .av-hamburger strong {
    display: block!important;
    position: absolute;
    left: -90%;
    top: 0;
    font-size: 20px;
    transform: translate(-90%, -44%);
    }

    kind regards
    Jürgen

    #1156350

    Hi,

    Thank you for the update.

    You can use the “icl_language_selector” action hook inside the header container to render the language switcher beside the burger menu element. Add this code in the functions.php file.

    function ava_icl_language_selector(){
    	do_action('icl_language_selector');
    }
    add_action('ava_main_header', 'ava_icl_language_selector');

    You can then adjust its position using css.

    Best regards,
    Ismael

    #1156419

    Hi Ismael,
    thank you!

    That worked! Unfortunately I’m not a programmer. So I need your help with the appropriate CSS code to get the language changer in the right position next to the burger menu.
    1. The position to the left of the burger menu (I can then correct pixel spacing myself)
    2. removed the gray frame (below the language changer)
    3. The ability to change the color of the font
    4. Adjust the font size

    Can you help me with this?

    Best regards
    Jürgen

    #1156746

    Hi Jürgen,

    Could you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #1156839

    Hi Victoria,
    yes, see Screenshot …

    Best regards
    Jürgen

    #1156982

    Hi Jürgen,

    Have you tried this solution here
    https://kriesi.at/support/topic/language-selector-near-the-burger-icon/#post-941403

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1157132

    Hi Victoria,
    thank you! I integrated the code. But now the language switch is under the logo on left side and a gray line runs around the entire header area. I can not adjust in the wpml settings. The language switch should be right next to burger menu and the line would have gone. How can I adjust this?

    Thank you very much

    Best regards,
    Jürgen

    #1158008

    Hi,

    Thank you for the update.

    You can add the following css code to adjust the position of the language switcher — move it beside the burger menu and add a thin border between the items.

    #lang_sel_list {
        position: absolute;
        right: 50px;
        top: -10px;
        border: 0;
    }
    
    #lang_sel_list .wpml-ls-item {
    	border-right: 1px solid;
    }
    
    #lang_sel_list .wpml-ls-item:last-child {
    	border-right: 0;
    }
    

    Please don’t forget to toggle the Performance > File Compression settings after adding the code.

    Best regards,
    Ismael

    #1158089

    Hi Ismael,
    thank you so much!
    Hhat looks very good now, just as I wanted it! Can you also give me the CSS code that it looks like on the smartphone. So the language switch next to the burger menu without a gray line? See Screenshot.

    Best regards
    Jürgen

    #1158781

    Hi,

    Thank you for the update.

    Did you put the code inside a css media query? Please move it outside so that it will also be applied on mobile view, then add this one inside a css media query to adjusts the size of the logo and create more space for the switcher and burger menu.

    .responsive .logo img {
    	max-height: 109px !important;
    }

    You may need to adjust the line-height property of the switcher and mobile menu.

    #lang_sel_list {
        line-height: 105px;
    }
    
    .html_burger_menu_active #top #wrap_all #header .av-burger-menu-main > a {
    	line-height: 105px !important;
    }

    Add the code inside the css media query for mobile view.

    Best regards,
    Ismael

    #1158813

    Hi Ishmael,
    I have integrated the code into Enfold / Preferences / Quick-CSS! What is a “css media query”?
    I have now integrated this code, is that correct? On the smartphone it still looks wrong!
    Best regards
    Jürgen

    /*Language switcher neben burger menu*/
    #lang_sel_list {
    position: absolute;
    right: 50px;
    top: -8px;
    border: 0;
    }
    #lang_sel_list .wpml-ls-item {
    border-right: 1px solid;
    }
    #lang_sel_list .wpml-ls-item:last-child {
    border-right: 0;
    }
    /*Language switcher Version 2*/
    .responsive .logo img {
    max-height: 109px !important;
    }
    #lang_sel_list {
    line-height: 105px;
    }
    .html_burger_menu_active #top #wrap_all #header .av-burger-menu-main > a {
    line-height: 105px !important;
    }

    #1159051

    Hi,

    Thank you for the update.

    A css media query looks something like this.

    @media only screen and (max-width: 767px) {
       body {
        background-color: lightblue;
      }
    }

    The background color will only be applied to the body element when the device’s screen width is equal or less than 767px. Please review our suggestions above and move the css code accordingly. Or post the login details in the private field so that we can edit the css modifications.

    Best regards,
    Ismael

    #1159123

    Hi Ismael,
    thanks for your help. I give you access to the WordPress backend. I can not do that myself :-)
    I made a backup of the page!

    Best regards,
    Jürgen

    #1159746

    Hi,

    Sorry for the delay. We corrected the css code in the Quick CSS field and added the recent modification for mobile view. We also disabled the Performance > File Compression settings temporarily. Please check the following screenshot.

    Screenshot: https://imgur.com/a/CFtoIqA

    Best regards,
    Ismael

    #1159975

    Hi Ismael,
    great, now it fits mobile! I adjusted it a bit in the Quick-Css, so that it looks good on the Iphone as well.

    Please do not close the tread yet, maybe I have a question about the Layerslider. But that can only be clarified tomorrow.

    Thank you very much !!!

    Best regards
    Jürgen

    #1160167

    Hi,

    Great! You’re welcome.

    If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

    Thanks!

    Best regards,
    Ismael

    #1160317

    Hi Ismael,
    ok, thank you! I will open them up in a separate thread.

    Best regards,
    Jürgen

    #1160722

    Hi Jürgen,

    Ok, we are closing this thread for now :)

    Best regards,
    Victoria

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘WPML language switcher in menu’ is closed to new replies.