Created
July 22, 2021 00:39
-
-
Save yigitfindikli/b966ded1addfdb002b54a839bdbb732f to your computer and use it in GitHub Desktop.
PrimeNG I18N API with ngx-translate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="p-d-flex p-ai-center p-jc-between p-mt-3"> | |
<div class="p-col-6"> | |
<h2 class="p-ml-3">{{ 'demo.greetings' | translate }}</h2> | |
</div> | |
<div class="p-d-flex p-col-6 p-jc-end"> | |
<div class="p-mr-3"> | |
<p-radioButton (ngModelChange)="changeLang($event)" name="language" value="en" [(ngModel)]="lang" | |
inputId="en"></p-radioButton> | |
<label class="p-ml-1" for="en">{{ 'demo.en' | translate }}</label> | |
</div> | |
<div class="p-mr-3"> | |
<p-radioButton (ngModelChange)="changeLang($event)" name="language" value="fr" [(ngModel)]="lang" | |
inputId="fr"></p-radioButton> | |
<label class="p-ml-1" for="fr">{{ 'demo.fr' | translate }}</label> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment