For all the static text in my app I am using i18n but now I have come across a case like this. In my service.ts file I have some hard coded JSON like
sources = [
{ title: 'Phone', description: 'phone description', icon: 'phone', type: 'phone' },
{ title: 'Chat', description: ' Chat description', icon: 'chat', type: 'chat' },
{ title: 'Email', description: 'Email description', icon: 'mail_outline', type: 'email' }
];
Then in my HTML I am *ngFor'ing though this, problem is I can't do the i18n in the HTML. Current solution is to in my TS file get the user language or browser language if I don't have user lang and then get a different JSON from the service, depending on this.
Can anyone think of another solution or way around this?
Thank you