Skip to content

Instantly share code, notes, and snippets.

@bodrovis
Last active January 9, 2019 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bodrovis/68f6c1f27ca44ac36fd09bdba006e5ef to your computer and use it in GitHub Desktop.
Save bodrovis/68f6c1f27ca44ac36fd09bdba006e5ef to your computer and use it in GitHub Desktop.
// other imports...
import { TranslateService } from '@ngx-translate/core'; // add this
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private translate: TranslateService // add this
) {
this.initializeApp();
}
initializeApp() {
// other stuff...
this.translate.setDefaultLang('en'); // add this
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment