Tagged: , ,

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #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

    #583893

    Some 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.

    #583895

    strange… 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.

    #585398

    Hey!

    please go to WPML->Languages->”Language switcher options” and make your adjustments there.

    Regards,
    Andy

    #585917

    Hi,
    WPML->Languages->”Language switcher options” do not work. The WPML support team told me the, “language switcher is part of your theme Enfold, not from WPML. That is why the options don’t take effect.”. Are there Enfold settings to do with language switchers?

    Thanks

    #585920

    ok… 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.

    #587163

    Hi!

    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,
    Andy

    #587456

    Hi 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.

    #588831

    Hey!

    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,
    Ismael

    #589386

    Hi!

    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.
    #589464

    Thanks. 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!

    #590742

    Hi!

    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!

    #591812

    I 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! =\

    #592205

    Hi _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!

    #592451

    what’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.php

    I’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!

    #593677

    Hey!

    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!
    Ismael

    #620072

    Hi,

    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,

    #621896

    Hey!

    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,
    Ismael

    #622030

    Done ….
    Very easy …
    Thank you

    #622821

    Hi,

    You’re welcome :-)

    Best regards,
    Rikard

    #695473

    I 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');
    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);
    }
    to function.php but nothing happens.
    What else should I do?

    • This reply was modified 8 years, 1 month ago by gianmarizzi.
    #695476

    Hi!

    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,
    Yigit

    #695477

    Super! Thanks a lot.

    #695489

    Hey!

    You are welcome! Let us know if you have any other questions or issues! :)

    Regards,
    Yigit

Viewing 24 posts - 1 through 24 (of 24 total)
  • The topic ‘WPML Language Switcher’ is closed to new replies.