My team is currently working on a web project where the front end uses json api provided by the back end. The technology that we use is Spring Boot and AngularJS. The api has th
If I had to do this, I would have done it on the back end, primarily because since the backend has the locale, and is also generating the errors, it does make sense to expect localized errors from it. It would also de-couple the systems, such that, if there is any new feature/change done on the back end, and a new error is added, you do not need to release the front end piece just for the error.
Also, once this scales up, and you have multiple backend systems, the above approach just works well, since all the error generators are responsible for taking care of their respective localizations.
I would do it by localizing everything on the frontend. Backend would send ids which client apps then translate to localized text.
Benefits:
Drawbacks:
To support multiple client apps you might need resx transformation during bundling step in your build. It will create resource files in the format required by the client so you can keep a single source of translations