import { Component } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrl: './app.component.css'
})
export class AppComponent {
  title = 'ogWebconsole';
  constructor(private translateService: TranslateService) {
    const savedLanguage = localStorage.getItem('language') || 'es';
    this.translateService.use(savedLanguage);
  }
  ngOnInit() {
  sessionStorage.setItem('language', 'es');
  }
}
