How to make Angular 9 i18n localization of back-end error codes or typescript component work?

Viewed 334

According to the official documentation of i18n of Angular, I see no way to handle error code coming from back-end to output message to the user based on it. So let's say, the response from back end came as code 2555 which maps to Maximum size of characters has been reached in one build of the app (the English one) and maps to La taille maximale des caractères a été atteinte in the French build of the app.

  • How to achieve this using Angular i18n localization ?
  • Is using $localize as suggested here considered safe for future upgrading ? since I can't find any info about it in the official documentation.
0 Answers
Related