Okay
  Public Ticket #3442402
Style of WPML Language Switcher
Closed

Comments

  •  15
    hahni started the conversation

    I tried to activate the WPML Language Switcher as option from Kalium settings. It works like expected. But i have to add the following recommendation:

    The style of the language switcher should be more "menu-like" - i mean like the normal kalium menu item with sub-items.

    Actual is not "possible" to place the language switcher at the end of the menu based on the layout. If it was styled as the original menu item it would work.

    Perhaps you have an idea how to re-style it or you plan to do this in the next update?

    Attached files:  Screenshot 2023-08-23 063534.png
      Screenshot 2023-08-23 063553.png

  •  1,558
    Laborator replied

    Hi hahni,

    There are two methods to add the language switcher, the first is from the Theme Options and the other is to add the switcher within the menu from the WPML settings, which I have done now:

    NH0Psq.png

    The language switcher live in your site:

    94hajc.png


    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  15
    hahni replied

    Thanks for your idea, but now:

    - the layout is "like" Kalium - great

    - it's in the main menu - not perfect

    - the layout is not clean because the div is bigger than it should be

    - the right solution would be a more integrated kalium style of the wpml function

  •  15
    hahni replied

    Screenshot for last comment

    Attached files:  Screenshot 2023-08-23 122036.png

  •  1,558
    Laborator replied

    Hi again,

    2. What's wrong with the language switcher being in the menu? You can select on which menu you want the switcher to be from WPML settings.

    3. You can set the size to auto which depends on the length of language name, to do that add this CSS to Custom CSS:

    .standard-menu-container .menu>ul ul, 
    .standard-menu-container ul.menu ul {
        min-width: auto !important;
    }
    

    4. We are aware of that and we have worked to unify the styles in the menu and header settings.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  15
    hahni replied

    Hi Art

    i tested some things with the "shortened" submenu style. It works but one point is open:

    If the layout is not tweaked (the size is set to 200) the last menu is set to justify right with makes a great layout - but too long and the hover underline is going over the complete line.

    If tweaked the hover line is not going over the complete line and the popup is not justify right to the main.

    Perhaps only a detail but i find it important.


    Attached files:  Screenshot (262).png
      Screenshot (263).png

  •  1,558
    Laborator replied

    Hi again,

    Can you try by adding this CSS to Custom CSS:

    .standard-menu-container .menu>ul ul, 
    .standard-menu-container ul.menu ul {
        left: auto !important;
        right: 0 !important;
    }
    

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  15
    hahni replied

    Hello Art

    I tried but it doesn't work - if i add this

      min-width: auto !important;

    from the first hint then it works: the last menu item opens to the left but all other items too.  Perhaps this could be a workaround but not the final solution.

    Regards André


  •  1,558
    Laborator replied

    Hi André,

    Could you provide the login credentials again as the login link doesn't seem to be working anymore.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •   hahni replied privately
  •  15
    hahni replied

    The main cause (for my opinion) is the text from wpml (orginal language description and flag) - if they are switched off the underline is still long like they are switched on.

  •  1,558
    Laborator replied

    Hi again,

    I have made some changes only for the last item - the language switcher, now the submenu of the last item will be within the container (has the right set to 0) while the other menu items are shown as always.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  15
    hahni replied

    It works great. I want to mention that all of this depends on the WPML base and how Kalium interprets the content with CSS. The "to much space" is the possible space for the original language part and the flag part. Your position as the theme developer could resolve this in the next updates.

    For me this workaround works actually perfect and like it should be. Thanks a lot.

    Regards André

  •  1,558
    Laborator replied

    Happy to hear it works for you André, we will check this in the future updates and how we can resolve it with WPML.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  • corotos replied

    Hello Art,


    I have a very similar problem. I tried what you say in this post but I can not find the solution.


  •  1,558
    Laborator replied

    Hi corotos,

    Please create a new ticket and include your site URL with the credentials, as you are replying in a public ticket.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group