ng-matero/extensions

Add MtxSelectIntl to allow translation of the default MtxSelect texts at runtime

sebastian-altamirano opened this issue · 2 comments

Problem:

MtxSelectDefaultOptions allows, among other things, to modify the default texts of MtxSelect, however we can only set it once, so if our application allows to change the language at runtime we must resort to change the texts through the component inputs (which causes code duplication).

Proposed solution:

Add MtxSelectIntl to allow changing texts at runtime, in the same way that MtxDatetimepicker allows it through MtxDatetimepickerIntl.

As for MTX_SELECT_DEFAULT_OPTIONS, properties containing translations should be deprecated.

nzbin commented

Thanks for your advice, the 18.4.0 added MtxSelectIntl service, please have a try.

Works as expected, thanks!