I have an Angular 7 application that has already been built. Now we are planning to support it in to multiple languages. The issue is with success/failure messages we are showing on page depending on api calls. For this we are using one global file with variable id defined. How can I translate this file and use in the application as per locale. Currently I am importing the file, wherever used, like this.
import { GlobalMsg } from '/globalModule/globalMsg';
and using like errorMsg = GlobalMsg.errorMsg;
File globalMsg
is defined like this.
export class GlobalMsg {
// Global Msgs
public static errorMsg = 'Some error occured';
}
Thank you.