From cafe542b5e3d86a42ee16d23245e4f153f675f07 Mon Sep 17 00:00:00 2001 From: Chris Steele Date: Fri, 19 Jul 2024 16:12:58 +0100 Subject: [PATCH] Fixes #566 --- js/router.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/router.js b/js/router.js index 37de000c..746e0e3d 100644 --- a/js/router.js +++ b/js/router.js @@ -32,6 +32,7 @@ class Router extends Backbone.Router { this.$html = $('html'); this.listenToOnce(Adapt, 'app:dataReady', this.setDocumentTitle); this.listenTo(Adapt, 'router:navigateTo', this.navigateToArguments); + this.listenToOnce(Adapt, 'configModel:dataLoaded', this.onConfigLoaded); } get rootModel() { @@ -574,6 +575,14 @@ class Router extends Backbone.Router { return this.model.set(...args); } + onConfigLoaded() { + this.listenTo(Adapt.config, 'change:_activeLanguage', this.onLanguageChange); + } + + onLanguageChange() { + this.updateLocation(null, null, null, null) + } + } const router = new Router({