You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are different ways to approach the translation problem. We have different constants in manfred-common. Let's look at the example in experience-section.constants to understand the issue, but this extrapolates to all others.
In this case, we are already using the value according to what we receive from JSON. But now there is a need to have it in English. How do we do it? Several options come to mind:
Add a new field with the English translation. But this forces us to maintain two fields. Also, if we want to add more languages, it complicates things.
Remove the types and directly add what comes from JSON in the mapper, which would be the key, and then translate it as needed in each application. The only thing we would pass is the key we had in the types, i.e., freelance, publicAdministration, etc.
This way, we can pass the type in each application and translate it as needed. But this forces us to do it in each application. Also, if we want to add more languages, we would have to do it in each application.
As a third option, I suggest doing the translations in manfred-common and serving them to the different applications. In each application, we would already have access to the translations. With this, we would only have to add common translations in one place, and they would be available in all applications. Additionally, if we want to add more languages, we only need to add them in one place.
The biggest problem I see is how to do it; I think it can be done by detecting the browser's language and, based on that, loading the translations. However, I'm not sure if this is the best way to do it. Since these are independent packages, we would need to investigate whether it can be done.
The text was updated successfully, but these errors were encountered:
There are different ways to approach the translation problem. We have different constants in manfred-common. Let's look at the example in experience-section.constants to understand the issue, but this extrapolates to all others.
In this case, we are already using the value according to what we receive from JSON. But now there is a need to have it in English. How do we do it? Several options come to mind:
./packages/manfred-common/src/experience-section/experience-section.constants.ts
./packages/manfred-awesomic-cv/src/mappers/experience/experience.mapper.ts
This way, we can pass the type in each application and translate it as needed. But this forces us to do it in each application. Also, if we want to add more languages, we would have to do it in each application.
The biggest problem I see is how to do it; I think it can be done by detecting the browser's language and, based on that, loading the translations. However, I'm not sure if this is the best way to do it. Since these are independent packages, we would need to investigate whether it can be done.
The text was updated successfully, but these errors were encountered: