Fix lang pre-selection of lang picker
(would break in cases when html10n might not have loaded yet)pull/1297/head
parent
23b7469df6
commit
580d936e50
|
@ -75,7 +75,10 @@ var padeditor = (function()
|
||||||
{
|
{
|
||||||
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
||||||
});
|
});
|
||||||
$("#languagemenu").val(window.html10n.getLanguage());
|
|
||||||
|
html10n.bind('localized', function() {
|
||||||
|
$("#languagemenu").val(html10n.getLanguage());
|
||||||
|
})
|
||||||
$("#languagemenu").change(function() {
|
$("#languagemenu").change(function() {
|
||||||
pad.createCookie("language",$("#languagemenu").val(),null,'/');
|
pad.createCookie("language",$("#languagemenu").val(),null,'/');
|
||||||
window.html10n.localize([$("#languagemenu").val(), 'en']);
|
window.html10n.localize([$("#languagemenu").val(), 'en']);
|
||||||
|
|
Loading…
Reference in New Issue