Created
July 23, 2021 11:49
-
-
Save yigitfindikli/b969edd1714343d0f96f1e014453cf8f 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> | |
<div class="p-fluid p-formgrid p-grid p-jc-center p-mt-3 p-mr-0"> | |
<div class="p-col-6"> | |
<div class="p-field p-col-12"> | |
<label for="date">{{ 'demo.date' | translate }}</label> | |
<p-calendar inputId="date" [(ngModel)]="date"></p-calendar> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment