-
AuthorPosts
-
February 16, 2016 at 3:47 am #583867
Hi,
Are there Enfold settings to do with language switchers? If so where is that information in the documentation so I can read up on it? I’m trying to see the which language output I’d prefer (ie. with or without the native language name) but can’t seem to make anything happen except a flag in the main menu. The WPML support team is telling me that the language switcher options in their plugin do not take effect because “the language switcher is part of your theme, not from WPML“.
– Searching Enfold local documentation has one line of text “config-wpml: contains files that ensure the compatibility with the WPML Multilanguage Plugin”
– Searching online documentation at http://kriesi.at/documentation/enfold/ only shows one result (http://kriesi.at/documentation/enfold/?s=wpml) that does not address this issue.
Cheers
February 16, 2016 at 6:15 am #583893Some of my text didn’t make it into the initial message above, i think because of the quotes… here it is below.
====
The WPML support team is telling me – the language switcher is part of your theme (Enfold), not from WPML. That is why the options don’t take effect. –
====I am trying to get the native language name to show up next to the flag in the main menu, WPML says it’s an Enfold thing, and I can’t find any language switcher info in the documentation.
February 16, 2016 at 6:18 am #583895strange… my posts get cut at “WPML” which is made into a bit.ly link. Trying to paste plain text this time…
this language switcher is part of your theme, not from WPML. That is why the options don’t take effect.
February 18, 2016 at 2:05 pm #585398Hey!
please go to WPML->Languages->”Language switcher options” and make your adjustments there.
Regards,
AndyFebruary 19, 2016 at 9:11 am #585917February 19, 2016 at 9:15 am #585920ok… there is something fishy going on with your forum. Everytime I type that sentence with “WPML” in it my text is truncated.
Anyway… The W-P-M-L support team told me the language switcher I am seeing at the link posted above is from Enfold… and that is why none of the settings at W-P-M-L->Languages->”Language switcher options” have any effect.
February 22, 2016 at 2:58 pm #587163Hi!
I don’t get what you are trying to achieve. Can you explain further please? do you want to change style (CSS) of your language switcher? if yes show us a mockup with the result, then we can provide you some precise code.
Regards,
AndyFebruary 22, 2016 at 9:24 pm #587456Hi Andy,
Well, it’s probably easier to go back to my initial post than explain in a different way… I am trying to answer the following question for the following reason:
“Are there Enfold settings to do with language switchers? If so where is that information in the documentation so I can read up on it? I’m trying to see the which language output I’d prefer (ie. with or without the native language name) but can’t seem to make anything happen except a flag in the main menu.”
W-P-M-L support says the settings in their plugin won’t take effect because the settings for the language switcher are controlled by Enfold. So… I’m still trying to figure out “Are there Enfold settings to do with language switchers?” … and if so where are these settings so I can experiment with them? Enfold is supposed to be a ‘WPML Certified Theme” but I’m not seeing that in reality when it comes to controlling the display as indicated above so I thought I’d come here and ask.
February 25, 2016 at 9:38 am #588831Hey!
The theme has its own flag or language switcher configuration. If you want to disable it, add this in 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); }
Go to the WPML > Languages panel. Enable the Display the language switcher in the WP Menu. Select your main or secondary menu then configure the language switcher style as you please.
Regards,
IsmaelFebruary 25, 2016 at 7:11 pm #589386Hi!
I was trying this because I had the same problem, but in my case I had the flags in the Header Secondary Menu in the top bar right.
If I write this code it disappear everything.
Could I have the name instead of the flag in the Header Secondary Menu?thanks!
- This reply was modified 8 years, 8 months ago by inaudit.
February 25, 2016 at 9:24 pm #589464Thanks. It sounds like the answer is: no, there are no Enfold Theme Options to change the language switcher behaviour (you must edit functions.php manually)…. and there isn’t any Enfold documentation on WPML (you must come here and ask). Thanks for clearing that up, I wasn’t sure if I was missing something.
Ismael, you showed how to remove flags which would make the language switcher disappear entirely, all I have are the flags! Can you tell me all the options (not just how to remove the flag) so I can manually test the language switcher? For example (and back to my original question), I’d like to see what it looks like “with or without the native language name”. I’d also like to see what it looks like with the languages in a drop down.
avia_remove_main_menu_flags… what other language switcher ‘options’ can I change? Like…
is there a avia_add_main_menu_native_language_name?
is there a avia_add_main_menu_dropdown?
is there a avia_add_main_menu_dropdown_noflags?I would love to help myself rather than be given the answer, otherwise I learn nothing!
February 29, 2016 at 2:21 pm #590742Hi!
I would love to help myself but I think I can’t ;)
I’d need to change the flags and add the names instead, I hope it can be done some way.Thanks in advance for your help!
March 1, 2016 at 11:23 pm #591812I believe I understand a little clearer… in Ismael’s example “avia_remove_main_menu_flags” is the name of a function_to_add and can be anything we name the subsequent function to. Adding and removing filters and actions is how to affect the switcher and it seems ‘avia_append_lang_flags’ and the like are located in the WPML config.php file. I will try to figure out how to make further changes to the switcher by studying that file, looks like my best bet! =\
March 2, 2016 at 5:32 pm #592205Hi _envato_user_,
thanks… I barely understand what you say…
what’s strange is that no moderator is answering the question, they have been helping me answering all my questions so quickly.
Please, if you figure out how to do it… could you share?thanks!
March 3, 2016 at 7:11 am #592451what’s strange is that no moderator is answering the question, they have been helping me answering all my questions so quickly.
It’s easier to give someone your answer than to answer their question! haha =] I agree though, it has been several weeks and I’m still not much further ahead. Things I’ve learned…
1. There is no Enfold documentation regarding WPML.
2. WPML “language switcher” options don’t work when using the Enfold theme.
3. Enfold provides no “Theme Options” to replace the now inoperative WPML “language switcher” options.
4. Enfold “language switcher” changes must be made manually with filters and actions in functions.phpI’m fine with #4… a theme can’t plan for everything. BUT… some documentation or response here would be awesome! In a nutshell, it would be nice to know which filters and action combinations result in basic language switcher configurations… for example, with the native language name, and without. The languages in a drop down, etc…
I will continue to be patient, Enfold is the most popular theme in the world and the moderators must be too busy.
Thanks!
March 5, 2016 at 10:30 am #593677Hey!
I’m sorry for the delay. Note that replying to your own thread will push it back to the end of the queue and we won’t be able to answer it immediately. Please avoid bumping your own thread. After removing the flags with the code above, modify the language switcher in the WPML’s language switcher settings.
Go to the WPML > Languages panel. Enable the Display the language switcher in the WP Menu. Select your main or secondary menu then configure the language switcher style as you please.
Cheers!
IsmaelApril 22, 2016 at 4:31 pm #620072Hi,
Sorry to ask, but I new with WP and with Enfold theme. I also lost with this explanations about what do I need to do to have a language switcher with Enfold Theme. Where is WPML?
Can I install a new plug-in to do it? what do I really need to do.
Thanks in advance,
April 26, 2016 at 6:11 am #621896Hey!
You need to purchase a WPML license and install it as a separate plugin: https://wpml.org/?
This documentation will help: https://wpml.org/documentation/getting-started-guide/
Regards,
IsmaelApril 26, 2016 at 11:01 am #622030Done ….
Very easy …
Thank youApril 27, 2016 at 8:12 am #622821October 5, 2016 at 1:54 pm #695473I want to hide the horizontal list menu and keep the drop-down one so I added
add_action('after_setup_theme','avia_remove_main_menu_flags');
to function.php but nothing happens.
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);
}
What else should I do?- This reply was modified 8 years, 1 month ago by gianmarizzi.
October 5, 2016 at 1:57 pm #695476Hi!
Please change the code to following one
function avia_remove_main_menu_flags(){ remove_filter( 'wp_nav_menu_items', 'avia_append_lang_flags', 9998, 2 ); remove_filter( 'avf_fallback_menu_items', 'avia_append_lang_flags', 9998, 2 ); remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10); } add_action('after_setup_theme','avia_remove_main_menu_flags');
Best regards,
YigitOctober 5, 2016 at 2:00 pm #695477Super! Thanks a lot.
October 5, 2016 at 2:28 pm #695489 -
AuthorPosts
- The topic ‘WPML Language Switcher’ is closed to new replies.