translations do not update when translations change
I use angular translate on my site. I can successfully apply initial translations to the dropdown however they do not change when I change language.
`this.multipleCountySelectText = { buttonDefaultText: undefined, checkAll: undefined, uncheckAll: undefined, searchPlaceholder: undefined, selectionCount: undefined, }; this.$rootScope.$on('$translateChangeSuccess', () => { this.updateMultiSelectTranslations(); console.log(this.multipleCountySelectText); //the log shows the updated translations have been applied to //multipleCountySelectText however the change is not seen on the dropdown. });
private updateMultiSelectTranslations(): void { this.multipleCountySelectText.buttonDefaultText = this.$translate.instant('global.searchBar.anyCounty'); this.multipleCountySelectText.checkAll = this.$translate.instant('global.searchBar.checkAll'); this.multipleCountySelectText.uncheckAll = this.$translate.instant('global.searchBar.uncheckAll'); this.multipleCountySelectText.searchPlaceholder = this.$translate.instant('global.searchBar.search'); this.multipleCountySelectText.selectionCount = this.$translate.instant('global.searchBar.selectionCount'); }`
Having exact same issue . I believe that this can be easily fixed by making some changes into the code and putting 'watch' to the scope object which is being passed .