multilanguage implemented
This commit is contained in:
17
_config.yml
17
_config.yml
@@ -5,8 +5,23 @@ description: Hitomi.la viewer for Android
|
|||||||
baseurl: "/Pupil"
|
baseurl: "/Pupil"
|
||||||
|
|
||||||
show_downloads: true
|
show_downloads: true
|
||||||
google_analytics: UA-119938781-2
|
|
||||||
|
|
||||||
github:
|
github:
|
||||||
app_url: https://github.com/tom5079/Pupil-issue/releases/download/1.3/Pupil-v1.3.apk
|
app_url: https://github.com/tom5079/Pupil-issue/releases/download/1.3/Pupil-v1.3.apk
|
||||||
issue_url: https://github.com/tom5079/Pupil-issue/issues/new/choose
|
issue_url: https://github.com/tom5079/Pupil-issue/issues/new/choose
|
||||||
|
|
||||||
|
t:
|
||||||
|
en:
|
||||||
|
header:
|
||||||
|
description: Hitomi.la viewer for Android
|
||||||
|
download: "Download app"
|
||||||
|
issue: "Having a problem?"
|
||||||
|
or: "or…"
|
||||||
|
email: "Send an E-mail"
|
||||||
|
ko:
|
||||||
|
header:
|
||||||
|
description: 안드로이드 Hitomi.la 뷰어
|
||||||
|
download: "앱 다운로드"
|
||||||
|
issue: "문제가 있으세요?"
|
||||||
|
or: "또는…"
|
||||||
|
email: "이메일 보내기"
|
||||||
|
|||||||
@@ -25,8 +25,10 @@
|
|||||||
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
|
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
|
||||||
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
|
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
|
||||||
{% if site.show_downloads %}
|
{% if site.show_downloads %}
|
||||||
<a href="{{ site.github.app_url }}" class="btn">Download app (v1.3)</a>
|
<a href="{{ site.github.app_url }}" class="btn">{{ site.t[page.lang].header.download }}</a>
|
||||||
<a href="{{ site.github.issue_url }}" target="_blank" class="btn">Having a problem?</a>
|
<a href="{{ site.github.issue_url }}" target="_blank" class="btn">{{ site.t[page.lang].header.issue }}</a>
|
||||||
|
{{ site.t[page.lang].header.or }}
|
||||||
|
<a href="mailto:pupil.hentai@gmail.com" class="btn">{{ site.t[page.lang].header.email }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
9
_posts/2019-05-15-test.md
Normal file
9
_posts/2019-05-15-test.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
lang: ko
|
||||||
|
title: "테스트"
|
||||||
|
date: 2019-05-15 18:51:00 +0900
|
||||||
|
---
|
||||||
|
|
||||||
|
# 테스트입니당
|
||||||
|
이게 보인다구요? 야호~~~~~
|
||||||
26
en/index.html
Normal file
26
en/index.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
lang: en
|
||||||
|
---
|
||||||
|
|
||||||
|
<div id="home">
|
||||||
|
<h1>Blog posts</h1>
|
||||||
|
{% assign posts=site.posts | where:"lang", page.lang %}
|
||||||
|
<ul class="posts">
|
||||||
|
{% for post in posts %}
|
||||||
|
<li>
|
||||||
|
<span>
|
||||||
|
{{ post.date | date_to_string }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
»
|
||||||
|
|
||||||
|
<a href="{{ post.url }}">
|
||||||
|
{{ post.title }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{ post.excerpt }}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
17
index.html
17
index.html
@@ -1,7 +1,12 @@
|
|||||||
---
|
<script>
|
||||||
layout: default
|
var lang = navigator.language || navigator.userLanguage;
|
||||||
---
|
|
||||||
|
|
||||||
<div id="home">
|
switch (lang) {
|
||||||
<h1>Blog Posts</h1>
|
case "ko-KR":
|
||||||
</div>
|
window.location.href = "ko/";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
window.location.href = "en/";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
26
ko/index.html
Normal file
26
ko/index.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
lang: ko
|
||||||
|
---
|
||||||
|
|
||||||
|
<div id="home">
|
||||||
|
<h1>글 목록</h1>
|
||||||
|
{% assign posts=site.posts | where:"lang", page.lang %}
|
||||||
|
<ul class="posts">
|
||||||
|
{% for post in posts %}
|
||||||
|
<li>
|
||||||
|
<span>
|
||||||
|
{{ post.date | date_to_string }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
»
|
||||||
|
|
||||||
|
<a href="{{ post.url }}">
|
||||||
|
{{ post.title }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{ post.excerpt }}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user