feat(i18n): display lcode in language switcher (#565)
Some checks are pending
Build Site / Check and Build for Pull Requests (push) Waiting to run
Build Site / Build and Deploy on Main Push (push) Waiting to run

Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
redmie 2025-09-14 12:35:42 +02:00 committed by GitHub
parent 57277a0f23
commit 83b0a5d011
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 48 additions and 3 deletions

View file

@ -1,7 +1,12 @@
<li class="language-switcher">
<details class="dropdown">
<summary role="button" aria-haspopup="true" title="{{ macros_translate::translate(key="language_selection", default="Language selection", language_strings=language_strings) }}" aria-label="{{ macros_translate::translate(key="language_selection", default="Language selection", language_strings=language_strings) }}">
{%- if config.extra.show_selected_language_code_in_language_switcher -%}
<div class="language-switcher-icon language-switcher-icon-with-code"></div>
<div class="language-switcher-icon-code">{{lang}}</div>
{%- else -%}
<div class="language-switcher-icon"></div>
{%- endif -%}
</summary>
<div class="dropdown-content" role="menu">
{#- Display the current language first in the dropdown -#}