angularjs-dropdown-multiselect icon indicating copy to clipboard operation
angularjs-dropdown-multiselect copied to clipboard

translations do not update when translations change

Open CorwinMoyne opened this issue 8 years ago • 1 comments

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'); }`

CorwinMoyne avatar May 09 '17 21:05 CorwinMoyne

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 .

hakobsharabkhanyan avatar Jun 16 '17 08:06 hakobsharabkhanyan