Hey kyabroudi!
We use the is_rtl() wordpress function: http://codex.wordpress.org/Function_Reference/is_rtl to check if a rtl language is active or not. If the user selects a rtl language from the language switcher wordpress will load the required stylesheets automatically.
Cheers!
Peter
okay thanks that works .
but I have another 2 issues :
1- why I can’t change lang switcher style always shows the flag , no effect when I change it to drop down list from WPML setting
2- also can’t change direction of lang switcher , always appears right !!
Hi,
Can you post the link to your website please? a WordPress admin account would be helpful too.
Regards,
Josue
Hey!
Please add this on functions.php to disable the theme’s default WPML flags:
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);
}
Regards,
Ismael
thanks but this one hide the lang from the header at all can’t see it any more , any way I just change the lang flags and add this line for english lang and it works fine
.header_color nav{float:right;}
thanks ;)