eliminate one step from the translation process by auto-adding languages to selector
This commit is contained in:
parent
779b3914f9
commit
7b63decfee
@ -18,8 +18,17 @@ define([
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: isHtml ? '/customize/BottomBar.html' : '/customize/Header.html',
|
url: isHtml ? '/customize/BottomBar.html' : '/customize/Header.html',
|
||||||
success: function (ret) {
|
success: function (ret) {
|
||||||
//:$('iframe').height('96%');
|
var $bar = $(ret);
|
||||||
$('body').append(ret);
|
$('body').append($bar);
|
||||||
|
|
||||||
|
var $sel = $bar.find('#language-selector');
|
||||||
|
|
||||||
|
Object.keys(Messages._languages).forEach(function (code) {
|
||||||
|
$sel.append($('<option>', {
|
||||||
|
value: code,
|
||||||
|
}).text(Messages._languages[code]));
|
||||||
|
});
|
||||||
|
|
||||||
LS.main();
|
LS.main();
|
||||||
Messages._applyTranslation();
|
Messages._applyTranslation();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user