From 5d2e1565aca472217b4ef13ac7d7d224a424be2d Mon Sep 17 00:00:00 2001 From: Aiham Hasan Date: Mon, 7 Aug 2023 17:54:34 +0530 Subject: [PATCH] [MOSIP-28767] Did changes in login page to take language code from URL if present --- pre-registration-ui/src/app/auth/login/login.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pre-registration-ui/src/app/auth/login/login.component.ts b/pre-registration-ui/src/app/auth/login/login.component.ts index fc16852f..c7ed4c7b 100644 --- a/pre-registration-ui/src/app/auth/login/login.component.ts +++ b/pre-registration-ui/src/app/auth/login/login.component.ts @@ -111,6 +111,10 @@ export class LoginComponent implements OnInit { ); this.isCaptchaEnabled(); this.loadLanguagesWithConfig(); + let urlLangCode = this.router.url.split("/").pop(); + if (this.languageSelectionArray.indexOf(urlLangCode) !== -1){ + localStorage.setItem("langCode", urlLangCode); + } if (!localStorage.getItem("langCode")) { localStorage.setItem("langCode", this.languageSelectionArray[0]); }