Update to support French, Deutsch, Japanese and Spanish locales

This commit is contained in:
Wu Cheng-Han 2016-09-16 22:29:13 +08:00
parent 32073b55e4
commit 4cc00c6c40
2 changed files with 7 additions and 3 deletions

2
app.js
View File

@ -94,7 +94,7 @@ app.use(helmet.hsts({
}));
i18n.configure({
locales: ['en', 'zh'],
locales: ['en', 'zh', 'fr', 'de', 'ja', 'es'],
cookie: 'locale',
directory: __dirname + '/locales'
});

View File

@ -59,12 +59,12 @@
<% if(facebook || twitter || github || gitlab || dropbox || google) { %>
<span class="ui-signin">
<br>
<a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="width: 170px;"><%= __('Sign In') %></a>
<a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="min-width: 170px;"><%= __('Sign In') %></a>
</span>
<span class="ui-or"><%= __('or') %></span>
<% }%>
<span class="ui-signin">
<a href="<%- url %>/new" class="btn btn-lg btn-default" style="width: 170px;"><%= __('New guest note') %></a>
<a href="<%- url %>/new" class="btn btn-lg btn-default" style="min-width: 170px;"><%= __('New guest note') %></a>
<br>
<br>
</span>
@ -148,6 +148,10 @@
<select class="ui-locale">
<option value="en">English</option>
<option value="zh">中文</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
<option value="ja">日本語</option>
<option value="es">Español</option>
</select>
</div>
</div>