Sha256: d96ec45f5a64087f89fe86b1c3a7804df42ce4694e6620d1d2ffc40b6b781d4e
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
{% assign lang = page.lang | default: site.default_lang %} {% assign locales = site.data.locales[lang] %} {% if page.langs %} <p> <b>{{ locales.langs }}</b> {% assign langs = "zh-Hans, zh-Hant, en, ja" | split: ", " %} {% assign langnames = "简中, 繁中, EN, 日本語" | split: ", " %} {% if lang == site.default_lang %} {% assign url = page.url %} {% else %} {% assign urls = page.url | split: '/' %} {% assign url = "" %} {% for u in urls offset:2 %} {% assign url = url | append: "/" | append: u %} {% endfor %} {% endif %} {% for l in page.langs %} {% for i in (0..4) %} {% if langs[i] == l %} {% if l == page.lang %} {{ langnames[i] }} {% elsif l == site.default_lang %} <a href="{{ url }}">{{ langnames[i] }}</a> {% else %} {% assign prefix = "/" | append: l %} <a href="{{ url | prepend: prefix }}">{{ langnames[i] }}</a> {% endif %} {% endif %} {% endfor %} {% endfor %} </p> {% endif %}
Version data entries
6 entries across 6 versions & 1 rubygems