mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
28 lines
648 B
TypeScript
28 lines
648 B
TypeScript
import {Component} from 'angular2/angular2';
|
|
import {Control, ControlGroup} from 'angular2/forms';
|
|
|
|
import {IonicApp, App, Http} from 'ionic/ionic';
|
|
|
|
import {Translate, TranslatePipe} from 'ionic/ionic';
|
|
|
|
@App({
|
|
templateUrl: 'main.html',
|
|
pipes: [TranslatePipe]
|
|
})
|
|
class MyApp {
|
|
constructor(app: IonicApp, trans: Translate) {
|
|
this.app = app;
|
|
this.trans = trans;
|
|
|
|
this.trans.translations('de', {
|
|
'Location': 'lage'
|
|
});
|
|
|
|
console.log(this.trans.translate('Location'));
|
|
console.log(this.trans.translate('Location', 'de'));
|
|
//this.trans.setLanguage('de');
|
|
console.log(this.trans.translate('Location'));
|
|
|
|
}
|
|
}
|