Issue
I want to translate a bool to something from my localization. Usually I can translate with this expression: jhiTranslate="keepath.to.my.translated.property"
So I thought this would work:
<span>{{data.isValid ? jhiTranslate="myApp.data.isValid" : jhiTranslate="myApp.data.isNotValid"}} </span>
How can I access the translation function inside my property-binding?
By the way - this one works:
<span>{{data.isValid ? 'valid' : 'not valid'}} </span>
Solution
You can do this :
<span jhiTranslate="{{ 'keepath.to.my.translated.property' + data.isValid }}"></span>
And in jour translation file you put :
keepath.to.my.translated.property.true = YES (in the language you want)
Answered By - François
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.