-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
30 lines (28 loc) · 1021 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
layout: home
title: Home
---
<script type="text/javascript">
var userLang = navigator.languages && navigator.languages[0] ||
navigator.language ||
navigator.userLanguage;
if(userLang.indexOf('eo') > -1) { window.location.href = "./eo/"; }
{% for lang in site.data.languages %}
{% assign langCode = lang[0] %}
{% if langCode == 'eo' %}{% continue %}{% endif %}
else if(userLang.indexOf('{{ langCode }}') > -1 ) { window.location.href = "./{{ langCode }}/"; }
{% endfor %}
else { window.location.href = "./eo/"; }
</script>
<h1>Select Your Language</h1>
{% for lang in site.data.languages %}
{% assign langCode = lang[0] %}
{% if langCode == 'eo' %}{% continue %}{% endif %}
<em>{{ site.data.translations.elektuLingvon[langCode] }}</em><br />
{% endfor %}
<ul class="languages">
{% for lang in site.data.languages %}
{% assign language = lang[1] %}
<li><a href="/{{lang[0]}}">{{language.icon}} {{ language.label }} ({{ lang[0] }})</a></li>
{% endfor %}
</ul>