Commit d4dc0064 authored by Grand Francois's avatar Grand Francois
Browse files

Déplacement de l'initialisation de la langue de l'interface dans le composant principal

Showing with 13 additions and 5 deletions
+13 -5
......@@ -18,4 +18,16 @@ import { InternationalisationService } from './internationalisation.service';
})
export class AppComponent {
title = "Calculette hydro";
constructor(private intlService: InternationalisationService) { }
private initLocale() {
let docLocale: string = document['locale'] as string;
this.intlService.setLocale(docLocale);
//console.log("doc locale " + docLocale);
}
ngOnInit() {
this.initLocale();
}
}
......@@ -93,11 +93,7 @@ export class ParamInputComponent implements ControlValueAccessor, OnInit, DoChec
ngOnInit() {
// retrieve parameter from symbol
this._paramDef = this.paramService.getParameter(this._paramSymbol);
let docLocale: string = document['locale'] as string;
this.intlService.setLocale(docLocale);
// console.log("doc locale " + docLocale);
}
}
// private getValue() {
// if (this._paramDef.isDefined)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment