Make i18n optional
mlechler opened this issue Β· comments
Hi, first of all great library π
I use in my projects ngx-translate for the internationalization and not i18n. Unfortunately this library is the only one that forces me to import @angular/localize. I was wondering, if it is possible to make the i18n support somehow optional so that we aren't forced to use i18n? I would really appreciate this.
Thanks and have a good day,
Marcel
Hello. Thanks for opening this issue. From what I see the @angular/localize
import is just calling one function so it should't be such a performance hit (performance in the context of compilation). So even if you include the @angular/localize
and don't use the i18n
directive, it should not increase the bundle of your application at all. If you don't want to use the i18n you can use the okLabel
and cancelLabel
inputs on the timepicker directive.
Hi, thanks for your reply. I'm already using the two inputs. I was just wondering why i18n has to be used explicitly. All libraries that I know are free of such a restriction, even Material. Normally every user can use i18n for his own purposes like e.g. okLabel
and i18n-okLabel
.
Would such an approach be unthinkable?
@mlechler I will give it a try in the next few days when I have some free time and I will let you know how it goes π
Hi @IliaIdakiev, are there any updates?
@mlechler Sorry. I had a short break. This week I will look into it. Thanks.
Thanks a lot :)