I used this tutorial
https://ionicframework.com/docs/developer-resources/ng2-translate/
everything run , I can take json format but not print output
en.json
{
"HELLO": "hola",
"hi":"sa"
}
.ts constructor;
constructor(public navCtrl: NavController, public navParams: NavParams, public translate: TranslateService) {
translate.setDefaultLang('en');
}
.html block;
<div style="width: 100%;">
<p class="baslik">ACCOUNT</p>
<button ion-item>
<ion-label>{{ 'hi' | translate }}</ion-label>
</button>
<button ion-item>
<ion-label>{{ 'hi' | translate }}</ion-label>
</button>
</div>
but output;
hi
hi
when add button click event , this code block;
this.translate.use('en').subscribe(
value => {
// value is our translated string
console.log(value);
}
en.json return log;
