I am using Angular 9 for application development.
I have so many hard-coded texts in terms of Messages, Conditional Structures, Errors ect,. as shown below:
if (args.item.id === 'Excel') { //here text 'Excel' is hard-coded
}
this.toasterService.showMessage({
success: true,
message: 'Successfully exported data to your local system.' // Here message is hard-coded
});
I wanted to know that, is there any best-practice available to handle all these in a file (Json / TS ), so that it'll be helpful bundle for Localization in future?
Please guide me in this.