I'm encountering difficulty translating the notification message with parameters using ngx-translate/core
EXAMPLE CODE
en.json :
"message": {
"Successfully removed account": "Successfully removed account"
}
The translation json above shows how it should be formatted.
constructor(private translate: TranslateService,
private userService : userService)
async deleteAccount(account) {
try {
await this.userService.removeuserAccount(account.id);
this.notificationService.sendSuccess(this.translate.instant(`message.Successfully removed account ${account.id}`));
} catch (err) {
this.notificationService.sendError(this.translate.instant(`message.Unable to delete account: ${err.message}`));
}
}
I would appreciate any assistance in resolving this issue.
We are looking for a similar fix to this issue in the following components link: https://github.com/ngx-translate/core/pull/990