Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sebastian-altamirano opened this issue Oct 22, 2024 · 2 comments
Labels
area: select Issues about select enhancement This issue is tracking a function should be enhanced

Comments

@sebastian-altamirano
Copy link

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 nzbin added discussion Discussion for the project area: select Issues about select labels Oct 23, 2024
@nzbin nzbin added enhancement This issue is tracking a function should be enhanced and removed discussion Discussion for the project labels Dec 5, 2024
nzbin added a commit that referenced this issue Dec 5, 2024
@nzbin
Copy link
Member

nzbin commented Dec 5, 2024

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

@sebastian-altamirano
Copy link
Author

Works as expected, thanks!

@nzbin nzbin closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: select Issues about select enhancement This issue is tracking a function should be enhanced
Projects
None yet
Development

No branches or pull requests

2 participants