Skip to content

Commit

Permalink
Merge pull request #163 from aihamh/develop
Browse files Browse the repository at this point in the history
[MOSIP-28767] Did changes in login page to take language code from URL if present
  • Loading branch information
mayuradesh authored Aug 7, 2023
2 parents 1a5734d + 5d2e156 commit 6c2091b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pre-registration-ui/src/app/auth/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 6c2091b

Please sign in to comment.