Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #304673

    Hello,

    I am using WPML to translate http://www.franchiseelites.com into other languages. I have some problem with the language switcher:

    1) I want a drop down menu for the language switcher. There is an option for drop down menu in WPML contols but it doesn’t work or at least I don’t undrestand why?!

    2) In mobile version everything in the top line is cramped into one another. How can I arrange that in a way that looks fine in mobile. Specially with more languages this will have a very bad look.

    3) How can I increase the font size of the email and phone number above the header?

    Thanks
    Amir

    #304762

    Hey afarahani!

    1) You can use this code to remove the default theme flags completely – insert it into the functions.php file:

    
    add_action('after_setup_theme','avia_remove_main_menu_flags');
    function avia_remove_main_menu_flags(){
            remove_filter( 'wp_nav_menu_items', 'avia_append_lang_flags', 20, 2 );
            remove_filter( 'avf_fallback_menu_items', 'avia_append_lang_flags', 20, 2 );
            remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10);
    }
    

    Then go to WPML > Languages and tick the “Display the language switcher in the WP Menu” option. You can also configure the language switcher type (dropdown, list, etc.) on this option page.

    2) Try to insert this code into the quick css field to move the mail address to the next line:

    
    @media only screen and (max-width: 767px){
    .responsive .phone-info{
    display: block;
    margin-top: 29px;
    }
    }
    

    3) Use this css code and adjust the font-size value:

    
    .phone-info span {
    font-size: 20px;
    }
    

    Regards,
    Peter

    #305393

    I’d rather to keep the theme language switcher but as the number of languages increases there would be problem with space specially in mobile version. Is there any way to have a drop down menu for the language switcher at the same default location?

    #305454

    Another question:
    I used the code you gave me above to move the phone and email to the next line in mobile view. However, when I add 5 or 6 languages, some of the flags go to the next line in mobile view. Is there any way to reduce the space between the flags in mobile version so I can have all of them in one line

    Thanks,
    Amir

    #305531

    Hi!

    Thank you for the update.

    Yes, it is possible to have the language dropdown on the top left corner but you need to fix the style of the dropdown element. Add this on functions.php right after the first suggestion above:

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

    Best regards,
    Ismael

    #305569

    Ismael,

    This doesn’t work. It creates two boxes outside of the header. take a look here: http://www.franchiseelites.com/fa/

    #305575

    Ismael, How about reducing the space between the flags in mobile view if I keep using the theme default language switcher. Can you let me know how to do that?

    #305850

    Hi!

    Keeping the theme language switcher but using a dropdown instead is not possible. If you want to stick with the theme language switcher you must also stick with the default theme design. If you want to use a dropdown instead please follow the instructions I posted here: https://kriesi.at/support/topic/wpml-language-switcher-and-header-arrangment/#post-304762 . The WPML plugin should add the language dropdown to the menu if you tick the “Display the language switcher in the WP Menu” option and select the main menu in the dropdown: http://www.clipular.com/c/5697699709976576.png?k=tR7hiYan-r1Pht6Rl__rwYgcx8k

    I tested it on my website here: http://test.inoplugs.com/portfolio-deutsch-test/ – you can select “English” from the dropdown to go to the translated page.

    Best regards,
    Peter

    #306033

    Peter,

    I’ll stick with the theme language switcher. Just let me know how I can decrease the spacing between each flag so I can fit 5 of them on the same line in mobile view.

    Thanks,
    Amir

    #306083

    Hey!

    If you want to decrease the padding between the flags, please use this on Quick CSS or custom.css:

    @media only screen and (max-width: 767px) {
    .responsive #header_meta .sub_menu>ul.avia_wpml_language_switch>li {
    padding: 0;
    }
    }

    Remove browser cache then reload the page a few times.

    Cheers!
    Ismael

    #616713

    Hi there

    Regarding the same subject i am using the side header style with the WPML language switcher as a widget in the main menu side bar, so only in the mobile version the switcher is completely hidden kindly advise to show it over the header only in the mobile version

    #618158

    Hey!

    your link does not work for me. Please check.

    You can try to work with header widget: http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/
    And then you can hide it on desktop if you want and show it on mobile only. I hope this will work for you.

    Regards,
    Andy

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.