If I had to do this, I would do it in the background, primarily because, because the backend has a locale and also generates errors, it makes sense to expect localized errors from it. It will also shut down the systems, so if there is any new function / change on the back panel and a new error is added, you do not need to free the front part just for the error.
In addition, as soon as it scales and you have several backend systems, the above approach works well, since all error generators are responsible for their respective localizations.
source share