mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Change translation on the fly
This commit is contained in:
@@ -298,6 +298,19 @@ export function uiInit(context) {
|
||||
});
|
||||
}
|
||||
|
||||
ui.restart = function(arg) {
|
||||
context.container().selectAll('*').remove();
|
||||
context.locale(arg);
|
||||
context.loadLocale(function(err) {
|
||||
if (!err) {
|
||||
context.history().unlock();
|
||||
render(context.container());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
window.restart = ui.restart;
|
||||
|
||||
ui.sidebar = uiSidebar(context);
|
||||
|
||||
return ui;
|
||||
|
||||
Reference in New Issue
Block a user