import { Component } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { FuseSplashScreenService } from '@fuse/services/splash-screen.service'; import { FuseTranslationLoaderService } from '@fuse/services/translation-loader.service'; import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; import { navigation } from 'app/navigation/navigation'; import { locale as navigationEnglish } from 'app/navigation/i18n/en'; import { locale as navigationTurkish } from 'app/navigation/i18n/tr'; @Component({ selector : 'app', templateUrl: './app.component.html', styleUrls : ['./app.component.scss'] }) export class AppComponent { navigation: any; /** * Constructor * * @param {FuseNavigationService} _fuseNavigationService * @param {FuseSplashScreenService} _fuseSplashScreenService * @param {FuseTranslationLoaderService} _fuseTranslationLoaderService * @param {TranslateService} _translateService */ constructor( private _fuseNavigationService: FuseNavigationService, private _fuseSplashScreenService: FuseSplashScreenService, private _fuseTranslationLoaderService: FuseTranslationLoaderService, private _translateService: TranslateService ) { // Navigation this.navigation = navigation; // Add languages this._translateService.addLangs(['en', 'tr']); // Set the default language this._translateService.setDefaultLang('en'); // Set the navigation translations this._fuseTranslationLoaderService.loadTranslations(navigationEnglish, navigationTurkish); // Use a language this._translateService.use('en'); } }