Friday, 15 March 2013

angularjs - How to do nested translation in Angular? -


I am trying to include the naned translation in angular also. Also included in this conditional.

Setup:

{{'EnterPINCodeMessage'}} & lt; / P & gt;

This is my translation file:

  {"EnterPINCodeMessage": "Enter the PIN code you received from {{partnerName}}. If you do not have a zip code, please contact {{partnerName}} for help. "," Your Provider ":" Your Provider "}  

If Enter, enter a value near the PinnerPanerName To use the {{PartnerName}} , if I use the {{'YourProvider'}} to translate {{partnerName} }} / P>

With this setup, this mer Results:

  & lt; P translation-value = "{partnerName: (enterPin.partnerName)? EnterPin.partnerName: YourProvider}" Translate = "" class = "ng-scope ng-binding" & gt; Enter the 13 digit PIN code you received. If you do not have a zip code, please contact for assistance. & Lt; / P & gt;  

which is provided as

, enter the PIN code of 13 digits. If you do not have any zip code, please contact for assistance.

I can enter, if 'enterpin.PartnerName' is empty, am I the partner to translate 'YourProvider'?

Thanks

This work is done:

  & lt; {Translate}}}}} Translate & gt; {{'EnterPINCodeMessage'}}  Page translation-value = "{partnerName: (enterPin.partnerName)? Enter Pin.partnerName: '{{' YourProvider '| translate}}'}" Translate & gt; {{'EnterPINCodeMessage'}} & lt; / P & gt;  

No comments:

Post a Comment