diff options
author | Alan Pearce | 2024-02-18 14:59:47 +0100 |
---|---|---|
committer | Alan Pearce | 2024-02-18 20:40:21 +0100 |
commit | d604fa65ddad76100d9061d35b4129e6c6c5771d (patch) | |
tree | 61114fffbf69c46b697462ec3aa6c3858ac28572 /templates/language_switcher.html | |
parent | a6000685cfcbb4253f634b44637b599cec96d5bc (diff) | |
download | zola-bearblog-d604fa65ddad76100d9061d35b4129e6c6c5771d.tar.lz zola-bearblog-d604fa65ddad76100d9061d35b4129e6c6c5771d.tar.zst zola-bearblog-d604fa65ddad76100d9061d35b4129e6c6c5771d.zip |
Create optional language switcher
Diffstat (limited to 'templates/language_switcher.html')
-rw-r--r-- | templates/language_switcher.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/language_switcher.html b/templates/language_switcher.html new file mode 100644 index 0000000..b82ddfc --- /dev/null +++ b/templates/language_switcher.html @@ -0,0 +1,11 @@ +{% if config.extra.language_switcher %} + <nav> + {%- for tr in config.extra.translations %} + {%- if tr.code == lang %} + <strong>{{ tr.name }}</strong> + {%- else %} + <a href="{{ get_url(path="/", lang=tr.code) }}">{{ tr.name }}</a> + {%- endif %} + {%- endfor %} + </nav> +{% endif %} |