You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
376 B
18 lines
376 B
import { Injectable } from '@angular/core';
|
|
import { TranslateService } from '@ngx-translate/core';
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class TranslationService {
|
|
get language() {
|
|
return this.translate.currentLang;
|
|
}
|
|
|
|
constructor(private translate: TranslateService) {}
|
|
|
|
onLanguageChange(language: 'fr' | 'en') {
|
|
this.translate.use(language);
|
|
}
|
|
}
|