summaryrefslogtreecommitdiff
path: root/_includes/snippets/get-locale-string.html
blob: a7069ae1759655c383d873d0025462e3a2ace890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{%- 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 -%}