We are currently in the process of adding localization to our system and I am trying to figure out what is the favorable option for that challenge. My system is a Microservice python based architecture web application. FE communicates with multiple BE microservices using a GW, each MS has different endpoints that should return strings according to locale.
There was some discussion around it here, but we are more focused on solution that will allow also a texts translations of data (from db) and in on-prem environment.
My current options are:
Adding a localization microservice that will be polled for string translations by FE after each call to a BE endpoint. (Does this scale well ? will this create overwhelming overhead?)
Adding a localization microservice to be used by other microservices in the BE for translations - this might cause a tight coupling with the other microservices, especially if we want to also translate data from the database on some level (and not just metadata). (1)
Translations will be done inside existing microservices - what is the best way to do it if I want to reduce the awareness of the microservices to the translation logic? Seems like Flask-Babel can help with the translation phase - but how to reduce the coupling of this code?
I would love to hear comments on said options and also suggestions for other options I might have missed. Thanks.