Is there a way to translate custom attributes values in child-components using Angular i18n AOT?
I know we can translate HTML element attributes as below.
<input i18n-placeholder="search criteria date @@criteriaDate"
placeholder="Date"
formControlName="date" required>
But I want to do the same thing for my component attributes. In this example I want to pass title attribute translated value.
<custom-spinner
formControlName="nights"
[title]="'Nights'"
i18n-title="search criteria nights@@criteriaNights">
</custom-spinner>
When I try this, it doesn't generate an entry on messages.xlf file. I couldn't find any examples on this.
title="Nights" i18n-title="search criteria nights@@criteriaNights"
. That works fine here. It's useless to use an angular expression and the bracket notation when all you want to pass is a hard-coded string. – Capwell