CMS Development

Christoph-W
Member

Language switcher module after module update

Hi, afer uodating the module 'language-swithcher' it doesn't work. Is there anybody who has experinces with the last update of the language-switcher module?

 

The code we are using is:

<!--
  templateType: global_partial
  label: Website header-lang
-->

{% if content.translated_content|length || is_listing_view && group.translations %}
<div class="header__language-switcher header--element" style="display:none;">
  <div class="header__language-switcher--label">
    {% module 'language-switcher' path='@hubspot/language_switcher', label='Language switcher', display_mode='localized' %} 
    <div class="header__language-switcher--label-current"> {{ locale_name(locale) }}</div>
  </div>
</div>
{% endif %}
<header class="header">
  <div class="header__container content-wrapper">

    {# Header logo column #}
    <div class="header__logo header__logo--main">
      <a href="https://www.vierviertel.com/{{ content.language }}" id="hs-link-site_logo_hs_logo_widget" style="border-width:0px;border:0px;"><img src="{{ site_settings.logo_src }}"  class="hs-image-widget " width="{{ site_settings.logo_width }}" height="{{ site_settings.logo_height }}" alt="{{ site_settings.logo_alt }}" title="{{ site_settings.logo_alt }}"></a>
      {# module 'site_logo' path='../../modules/custom logo' height='45'  #}
    </div>
    {# End header logo column #}
    <div class="menu">
      {% module 'navigation-primary' path='../../modules/menu-section',
            label='Primary navigation', no_wrapper=True
          %}
      {% module "module_162676500023532" path='../../modules/Button-text', label="text-button" %}
      <div class="language-menu">
        {% module_block module 'language_switcher' path='@hubspot/text' label='Language switcher' %}
        {% module_attribute 'value' %}
          <ul>
            <li><a data-lang="en">en</a></li>
          </ul>
        {% end_module_attribute %}
        {% end_module_block %}
      </div>
    </div>
      <!-- /.menu -->
  </div>
  <!-- /.header__container -->
</header>

 

Thank you for any help

Best

Christoph

3 Replies 3
GRajput
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

Language switcher module after module update

Hi @Christoph-W 

Your code is fine, but it will only work properly once you add the JavaScript and CSS. We've tested it, and everything works as expected after adding them. We're also sharing the screenshot with you for reference.

GRajput_0-1741699783024.jpeg

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

 

 




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes
Christoph-W
Member

Language switcher module after module update

Hi GRajput, thank you. Yes, the language switcher menu is working fine. But we don't want to display it as you can see in the code. We put another solution into the code, as you see. But this is not working after we made an update of the language-switcher module. Any idea?
Thank you. Christoph

GRajput
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

Language switcher module after module update

Hi @Christoph-W 

 

Could you please clarify what kind of design you're looking for? Please share any screenshor page link for understand better and what type of design you want. We're having trouble understanding your requirements, so we're not able to help you properly.

 

 

Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes