I have a question about architecture and I would like to know your opinion.
Given a product formed by an API and several consumers (Android apps, iOS apps, web apps ...), where should I implement the API response data localization? In the API itself or in each consumer? When I refer to data response I mean formatting dates, numbers, currencies and translating input errors.
I believe that localizing that kind of data in the API itself, having in mind proper standards such as ISO 639 or "Accept-Language" HTTP header, should be the way to go in order to improve coherence among all the consumers. This approach makes me think about two main problems:
- Making the API work harder might involve some performance issues if the product scales.
What do you think? How would you solve it?