Redo the translation system (steal from tabi)

This commit is contained in:
daudix
2024-06-20 08:42:24 +03:00
parent 8ae127d4ce
commit 40b1895618
18 changed files with 403 additions and 232 deletions

View File

@ -1 +1,8 @@
<a class="zola-anchor" href="#{{ id }}" aria-label="{{ trans(key="anchor_link", lang=lang) }}: {{ id }}"><i class="icon"></i></a>
{% import "macros/translate.html" as macros_translate %}
{% set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) %}
{% if not language_strings %}
{% set language_strings = load_data(path="themes/tabi/i18n/" ~ lang ~ ".toml", required=false) %}
{% endif %}
<a class="zola-anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}"><i class="icon"></i></a>