blob: d3cd38301b4d07620f1f092a5757c6eb466646b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{% if config.extra.language_switcher %}
<nav>
{%- if current_path %}
{%- set language_agnostic_path=current_path | replace(from='/' ~ lang ~ '/', to = '/') | trim_start_matches(pat = '/') -%}
{%- endif %}
{%- for tr in config.extra.translations %}
{%- if tr.code == lang %}
<strong>{{ tr.name }}</strong>
{%- else %}
{%- if language_agnostic_path %}
<a href="{{ get_url(path=language_agnostic_path, lang=tr.code) }}">{{ tr.name }}</a>
{%- endif %}
{%- endif %}
{%- endfor %}
</nav>
{% endif %}
|