Member-only story
Angular + @ngx-translate + Typings
An Angular tutorial step-by-step: typings in @ngx-translate

Introduction
When you decide to use Angular in a project, it means that you’re building a large SPA (otherwise, you should think of another framework). Large projects are usually intended for users in different countries and are carried out with translations of the application.
The library that, in my opinion, is the best to implement translation in an application belonging to Angular’s ecosystem is @ngx-translate. I have used this library since the beginning because it’s simple, powerful, and very useful.
However, the biggest drawback to this library that I find is that the translations are based on a key-value translation object in which to identify the key that you want to translate, you must specify a string. The fact of using a string causes us to lose all the type control of the variables that we want to translate.
What are the problems that arise from this?
- We cannot know if a key is lost, incomplete, or has a typo.
- We do not have autocomplete, despite having nested objects that can be complex.
- You cannot change the name of a key automatically (refactoring) between…