dialog
dialog copied to clipboard
Allow customization of confirm and cancel button texts
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
The text on the confirm and cancel buttons in the built-in confirm modal is set as "Cancel" and "Ok".
Expected behavior
I'd like to be able to pass the text I want as an argument to the confirm method. Something like this, for instance.
this.dialog.confirm({ confirmButtonLabel: 'Confirmar', cancelButtonLabel: 'Cancelar' })
Maybe that option is already available, but I couldn't find any mention to it - if that's the case, I think it would be nice to add that information to README.md.
You're welcome to submit a PR
When someone starts implementing this, could they make the configuration option also accept an observable? This would make it easier to use a translation library like transloco. It has a method returning an observable that emits when the language changes.
@NetanelBasal guess we can close this one as soon as a new version gets released?
Close this issue as we remove this feature in v3.