build: add i18n support
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -7,4 +8,11 @@ import { RouterOutlet } from '@angular/router';
|
||||
templateUrl: './app.html',
|
||||
styles: [],
|
||||
})
|
||||
export class App {}
|
||||
export class App {
|
||||
private readonly translate = inject(TranslateService);
|
||||
constructor() {
|
||||
this.translate.addLangs(['en', 'es', 'pt']);
|
||||
this.translate.setFallbackLang('en');
|
||||
this.translate.use('en');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user