From 8d2dc2fa65f36758174f9b58cf84d8578ef945bf Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 13 May 2020 19:43:13 +0300 Subject: [PATCH] fix: set html lang when the language change --- .../packages/core/src/lib/services/localization.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts index 0e89732e56..a3b452de11 100644 --- a/npm/ng-packs/packages/core/src/lib/services/localization.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/localization.service.ts @@ -33,9 +33,10 @@ export class LocalizationService { } private listenToSetLanguage() { - this.actions - .pipe(ofActionSuccessful(SetLanguage)) - .subscribe(({ payload }) => this.registerLocale(payload)); + this.actions.pipe(ofActionSuccessful(SetLanguage)).subscribe(({ payload }) => { + this.registerLocale(payload); + document.documentElement.lang = payload; + }); } setRouteReuse(reuse: ShouldReuseRoute) {