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> |
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
import { Component, OnDestroy } from '@angular/core'; | |
import { TranslateService } from '@ngx-translate/core'; | |
import { ConfirmationService, PrimeNGConfig } from 'primeng/api'; | |
import { Subscription } from 'rxjs'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
providers: [ConfirmationService] |
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
{ | |
"demo": { | |
"greetings": "Bonjour!", | |
"en": "Anglaise", | |
"fr": "Français", | |
"date": "La datte", | |
"emptyMessage": "Message vide", | |
"message": "Êtes-vous sûr de vouloir continuer?", | |
"confirm": "Confirmer", | |
"name": "Nom" |
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
{ | |
"demo": { | |
"greetings": "Hello!", | |
"en": "English", | |
"fr": "French", | |
"date": "Date", | |
"emptyMessage": "Empty Message", | |
"message": "Are you sure that you want to proceed?", | |
"confirm": "Confirm", | |
"name": "Name" |
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
{ | |
"dayNamesMin": [ | |
"Su", | |
"Mo", | |
"Tu", | |
"We", | |
"Th", | |
"Fr", | |
"Sa" | |
], |
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
import { Component, OnDestroy } from '@angular/core'; | |
import { TranslateService } from '@ngx-translate/core'; | |
import { ConfirmationService, PrimeNGConfig } from 'primeng/api'; | |
import { Subscription } from 'rxjs'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
providers: [ConfirmationService] |
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> |
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
{ | |
"demo": { | |
"greetings": "Bonjour!", | |
"en": "Anglaise", | |
"fr": "Français", | |
"date": "La datte" | |
}, | |
"primeng": { | |
"dayNamesMin": [ | |
"Di", |
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
{ | |
"demo": { | |
"greetings": "Hello!", | |
"en": "English", | |
"fr": "French", | |
"date": "Date" | |
}, | |
"primeng": { | |
"dayNamesMin": [ | |
"Su", |
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
constructor(private config: PrimeNGConfig) {} | |
ngOnInit() { | |
this.config.setTranslation({ | |
accept: 'Accept', | |
reject: 'Cancel', | |
//translations | |
}); | |
} |
NewerOlder