yannstatic/_includes/snippets/get-locale-string.html

13 lines
437 B
HTML
Raw Normal View History

2024-10-31 20:18:37 +01:00
{%- include snippets/get-lang.html -%}
{%- assign _lang = __return -%}
{%- assign _local_lang = site.data.locale[_lang] -%}
{%- assign _local_lang_en = site.data.locale.en -%}
{%- if _local_lang == nil -%}
{%- assign _local_lang = _local_lang_en -%}
{%- endif -%}
{%- if _local_lang[include.key] -%}
{%- assign __return = _local_lang[include.key] -%}
{%- else -%}
{%- assign __return = _local_lang_en[include.key] -%}
{%- endif -%}