I have an application that support both English and French and I would like to be able to change the customMessages based on the locale selected, to implement this I have a computed property that returns the custom messages based on the locale. When the locale is changed the computed property is called however the table is not refreshed.
messages: Ember.computed('i18n.locale', function() {
let i18n = this.get('i18n');
return Ember.Object.create({
'searchLabel': '' + i18n.t('component.mx_data_grid.label.search'),
'columns-title': '' + i18n.t('component.mx_data_grid.label.columns'),
'columns-showAll': '' + i18n.t('component.mx_data_grid.label.show_all'),
'columns-hideAll': '' + i18n.t('component.mx_data_grid.label.hide_all'),
'columns-restoreDefaults': '' + i18n.t('component.mx_data_grid.label.restore_defaults'),
'tableSummary': '' + i18n.t('component.mx_data_grid.label.table_summary'),
'allColumnsAreHidden': '' + i18n.t('component.mx_data_grid.label.all_columns_hidden'),
'noDataToShow': '' +i18n.t('component.mx_data_grid.label.no_data')
});
}),
{{models-table customIcons=icons customMessages=messages columns=participantColumns data=model}}