Fix lang pre-selection of lang picker

(would break in cases when html10n might not have loaded yet)
pull/1297/head
Marcel Klehr 2012-12-19 22:23:13 +01:00
parent 23b7469df6
commit 580d936e50
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ var padeditor = (function()
{
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
});
$("#languagemenu").val(window.html10n.getLanguage());
html10n.bind('localized', function() {
$("#languagemenu").val(html10n.getLanguage());
})
$("#languagemenu").change(function() {
pad.createCookie("language",$("#languagemenu").val(),null,'/');
window.html10n.localize([$("#languagemenu").val(), 'en']);