<?xml version="1.0"?>
<t name="Language Selector" t-name="portal.language_selector">
        <t t-nocache="The query strings can change for the same page and the same rendering." t-nocache-no_text="no_text" t-nocache-codes="codes" t-nocache-_div_classes="_div_classes" t-nocache-_btn_class="_btn_class" t-nocache-_txt_class="_txt_class" t-nocache-_dropdown_menu_class="_dropdown_menu_class">
            <t t-set="language_selector_visible" t-value="len(frontend_languages) &gt; 1"/>
            <div t-attf-class="js_language_selector #{_div_classes} d-print-none" t-if="language_selector_visible">
               <t t-set="active_lang" t-value="frontend_languages[lang]"/>
                <button t-attf-class="border-0 dropdown-toggle #{_btn_class or 'btn btn-sm btn-outline-secondary'}" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span t-if="not no_text" t-attf-class="#{_txt_class}" t-esc="active_lang.name.split('/').pop()"/>
                    <span t-elif="codes" class="align-middle" t-esc="active_lang.url_code.split('_').pop(0).upper()"/>
                </button>
                <div t-attf-class="dropdown-menu #{_dropdown_menu_class}" role="menu">
                    <t t-foreach="frontend_languages.values()" t-as="lg">
                        <a class="dropdown-item" t-att-href="url_localized(lang_code=lg.code, prefetch_langs=True, force_default_lang=True)" t-attf-class="dropdown-item js_change_lang #{active_lang == lg and 'active'}" t-att-data-url_code="lg.url_code" t-att-title="lg.name.split('/').pop()" role="menuitem">
                            <span t-if="not no_text" t-esc="lg.name.split('/').pop()" t-attf-class="#{_txt_class}"/>
                            <span t-elif="codes" t-esc="lg.url_code.split('_').pop(0).upper()" t-attf-class="align-middle #{_txt_class}"/>
                        </a>
                    </t>
                </div>
            </div>
        </t>
    </t>

    