Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #571621

    Hi:

    My client insists on removing all flags from the WPML laguage switcher I have in the tp manu, menu-2, of the website. The adress is below.

    I have tried several solutions, including two from this forum and several from WPML. Most are for putting flags there, my client wants no flags just a text language switcher.

    I can configure the WPML options not to show flags, but it shows them anyway for the current language and with the text in the dropdown for the other language—in this case French. (Note: I have French hidden currently. but you cn see from the active language.

    Enfold seems to override the WPML language switcher options because even with the flags option disabled for the dropdown in WPML they still show up.

    How can I un-hard-code all flags in the language switcher in Enfold to show only a text dropdown for thew two languages, English and French..

    Thank you.

    • This topic was modified 8 years, 2 months ago by blaircomm.
    #571624

    I forgot to add that the client also wants only “EN” for English and “FR” for French. How can I change these as well as the flag issue?

    #571639

    Hi!

    Please add following code to Quick CSS in Enfold theme options under General Styling tab

    span.language_flag {
        display: none!important;
    }

    Then please add following code to Functions.php file in Appearance > Editor

    function language_selector(){
    $languages = icl_get_languages('skip_missing=0&orderby=code');
    if(!empty($languages)){
    echo '<ul id="lansel">';
    foreach($languages as $l){
    echo '<li>';
    if(!$l['active']) echo '<a href="'.$l['url'].'">';
    echo ''.$l['language_code'].'';
    if(!$l['active']) echo '</a>';
    echo '</li>';
    }
    }
    echo '</ul>';
    }

    Regards,
    Yigit

    #571671

    Hi:

    The CSS hides the flag, which I had been able to do. But the language switcher does not work. I have tried all the WPML options—such as a horizontal list, but the language switcher gets disabled without the flag. This is the same issue I found before, I can hide the flag, but the language switched then does not work.

    If, for some reason, I cannot get this to work as text—since it seems the switcher is based on the flags as buttons and the text is just a label—is there a way to change the French flag to a Canadian flag, since the company is in Quebec?

    Thanks for your response.

    – Michael

    #572810

    Hi!

    would be best to ask WPML support about it, as they know their plugin best.

    Cheers!
    Andy

    #574138

    Hi:

    I have managed to delete the flags from the language switcher with this css: #header_meta .avia_wpml_language_switch { display: none; }

    Now I have a text-only dropdown the way the clients wants, and I have a question now about styling the dropdown from the secondary menu, (top,) without affecting the style of the dropdowns in the main menu which have the correct width.

    If you look at – https://ilovetylermadison.com/home/ (password=upscec) – you can see the dropdown for the language switcher, “EN”, is too wide. I would like to style it at 50px wide without having the dropdowns from the main menu be affected. I can style it, but is affects all the menus. I need to style just this secondary menu’s dropdown width.

    Can you point me to the correct CSS for that?

    Thank you.

    #576237

    Hey!

    The language switcher is not set to “dropdown”. All languages are visible in the header meta container. Please set it to dropdown then we’ll provide the css code.

    Cheers!
    Ismael

    #576446

    Hi:

    You’re right. After I eliminted the flag switcher, the client demanded that I eliminate the dropdown and use a horizontal text switcher. It is all resolved and I was so busy forgot to update this post.

    Thank you for your response, it is much appreciated.

    – Michael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Show WPML language switcher text only without any fags’ is closed to new replies.