Simplify lang setting in pad.html template
This commit is contained in:
parent
993d501943
commit
19c12239f6
|
@ -2,12 +2,12 @@ var Globalize = require('globalize')
|
||||||
, fs = require('fs')
|
, fs = require('fs')
|
||||||
, path = require('path')
|
, path = require('path')
|
||||||
|
|
||||||
exports.availableLangs = {}
|
exports.availableLangs = {en: 'English'}
|
||||||
fs.readdir(__dirname+"/../../locales", function(er, files) {
|
fs.readdir(__dirname+"/../../locales", function(er, files) {
|
||||||
files.forEach(function(locale) {
|
files.forEach(function(locale) {
|
||||||
locale = locale.split('.')[0]
|
locale = locale.split('.')[0]
|
||||||
if(locale.toLowerCase() == 'en') return;
|
if(locale.toLowerCase() == 'en') return;
|
||||||
|
|
||||||
require('globalize/lib/cultures/globalize.culture.'+locale+'.js')
|
require('globalize/lib/cultures/globalize.culture.'+locale+'.js')
|
||||||
var culture = Globalize.cultures[locale];
|
var culture = Globalize.cultures[locale];
|
||||||
exports.availableLangs[culture.name] = culture.nativeName;
|
exports.availableLangs[culture.name] = culture.nativeName;
|
||||||
|
|
|
@ -211,7 +211,6 @@
|
||||||
<p data-l10n-id="pad.settings.language">
|
<p data-l10n-id="pad.settings.language">
|
||||||
Language:
|
Language:
|
||||||
<select id="languagemenu">
|
<select id="languagemenu">
|
||||||
<option value="en">English</option>
|
|
||||||
<% for (lang in langs) { %>
|
<% for (lang in langs) { %>
|
||||||
<option value="<%=lang%>"><%=langs[lang]%></option>
|
<option value="<%=lang%>"><%=langs[lang]%></option>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in New Issue