Reputation: 1115
I have the following html code to get angular to translate the label from dash.title
and the span text from errors.correct
.
<label translate="dash.title"></label>
<span class="success text-small" translate="errors.correct" translate-values="{ fieldname: 'dash.title' | translate }"></span>
my errors.correct
in the i18n file is like this:
"errors": {
"correct": "The « {{fieldname}} » is correctly filled out!"
}
so my fieldname
has to get the value from the label
, it should be the same as the label text.
Why this setup is not working? what is the solution?
Upvotes: 1
Views: 758
Reputation: 2794
here is the solution:
translate-values="{ fieldname:'{{'dash.title' | translate}}' }"
Upvotes: 2