-
AuthorPosts
-
August 15, 2014 at 3:23 am #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
AmirAugust 15, 2014 at 9:26 am #304762Hey 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,
PeterAugust 17, 2014 at 6:20 am #305393I’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?
August 17, 2014 at 6:47 pm #305454Another 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 lineThanks,
AmirAugust 18, 2014 at 4:15 am #305531Hi!
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,
IsmaelAugust 18, 2014 at 6:02 am #305569Ismael,
This doesn’t work. It creates two boxes outside of the header. take a look here: http://www.franchiseelites.com/fa/
August 18, 2014 at 6:21 am #305575Ismael, 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?
August 18, 2014 at 4:53 pm #305850Hi!
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,
PeterAugust 19, 2014 at 12:18 am #306033Peter,
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,
AmirAugust 19, 2014 at 5:15 am #306083Hey!
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!
IsmaelApril 18, 2016 at 5:50 pm #616713Hi 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
April 20, 2016 at 10:56 am #618158Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.