mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
Fix lang pre-selection of lang picker
(would break in cases when html10n might not have loaded yet)
This commit is contained in:
parent
23b7469df6
commit
580d936e50
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue