Discussion on: Angular + @ngx-translate + Typings

vojtech profile image
Vojtech Mašek

Thanks for the feedback.

Yes, the change of the language is reconstructing the whole view, but it something we are willing to accept as a trade of as users are not changing the language that often. For some products, there is even a logic in cloud functions serving that page which language version will you be redirected to based on the request.

Why we decided to use the DI instead of the pipe was that we wanted to omit the impure translate pipe in our projects.
But some projects have the setup bit adjusted and have translations in ngrx store, displayed using async pipe. They are even combining and "patching" translations that are dynamically received from CMS (where editors write them) with local ones that we keep as the default and for the development. That means there should never be a missing translation in development nor production and everything new is just being merged with the default.

Overall I've seen multiple variations and they are perfectly fine, the best thing is the typings and errors in compile-time :D