Skip to content
Snippets Groups Projects
Commit d4dc0064 authored by francois.grand's avatar francois.grand
Browse files

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

parent a0d9528a
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment