diff --git a/_includes/js-selector.html b/_includes/js-selector.html index b37d7103..65c64537 100644 --- a/_includes/js-selector.html +++ b/_includes/js-selector.html @@ -33,7 +33,7 @@ or page.layout == 'category' or page.layout == 'tag' %} - {% assign locale = site.lang | split: '-' | first %} + {% assign locale = include.lang | split: '-' | first %} {% assign urls = urls | append: ',' diff --git a/_includes/lang.html b/_includes/lang.html index 19558a07..34b50dfa 100644 --- a/_includes/lang.html +++ b/_includes/lang.html @@ -1,7 +1,9 @@ {% comment %} Detect appearance language and return it through variable "lang" {% endcomment %} -{% if site.data.locales[site.lang] %} +{% if site.data.locales[page.lang] %} + {% assign lang = page.lang %} +{% elsif site.data.locales[site.lang] %} {% assign lang = site.lang %} {% else %} {% assign lang = 'en' %} diff --git a/_layouts/default.html b/_layouts/default.html index 7e355fe9..6e865b92 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -13,7 +13,7 @@ {% endif %} - + {% include head.html %}
@@ -76,7 +76,7 @@ - {% include js-selector.html %} + {% include js-selector.html lang=lang %} {% if page.mermaid %} {% include mermaid.html %}