I am using title attribute with some condition and my code is
<li title="{{admin ? 'purchase license pack':''}}"><span translate>pack.details</span></li>
Here when the admin is true then it shows purchase license pack. But how to make that one to i18n keys by using translate filter. I tried this,
<li title="{{admin ? '{{'purchase.pack'|translate}}':''}}"><span translate>pack.details</span></li>
But It shows parsing error. How to do this?
The error was natural since you were trying to interpolate the interpolation. However, You were quite close.. Try This :
<li title="{{admin ? ('purchase.pack'|translate) : ''}}"><span translate>pack.details</span></li>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With