Angular - ngx-translate - Checking if translate key exist with Angular
Since I found no way to safely check for the presence of a translation, the best thing I could do is to check for equality synchronously:
hasTranslation(key: string): boolean {
const translation = this.translateService.instant(key);
return translation !== key && translation !== '';
}
However, I filed an issue with ngx-translate, asking for an official check method.
So, for your template you could just test with hasTranslation(x) ? ... : ...