Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70439

How to translate strings with parameters?

$
0
0

@ioclaudio wrote:

Hi,
In an Ionic4 app I’d like to translate strings with parameters like these:

  1. <ion-label>I accept <a href="#" routerLink="/terms_conditions"> terms and conditions</a></ion-label>

  2. <ion-label>Thank you [userName] for registering</ion-label>

Which is the syntax to translate these strings?

I know that <ion-label>Username</ion-label> becames <ion-label>{{ Username | translate }} </ion-label>

For the first I’ve tried this, but doesn’t work:

<ion-label color="primary">{{ 'I accept <a href="#" routerLink="/terms_conditions"> terms and conditions</a>' | translate }}</ion-label>

Thank you

cld

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>