Skip to content

Commit

Permalink
update language toggle implementation and upgrade to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
di-fabs committed May 13, 2024
1 parent 425e1a8 commit 957e6e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/middleware/language-toggle-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export function languageToggleMiddleware(
res: Response,
next: NextFunction
): void {
res.locals.htmlLang = req.i18n.language;
res.locals.showLanguageToggle = process.env.LANGUAGE_TOGGLE === "1";
res.locals.currentUrl = new URL(req.protocol + "://" + req.get("host") + req.originalUrl);
next();
res.locals.htmlLang = req.i18n.language;
res.locals.showLanguageToggle = process.env.LANGUAGE_TOGGLE === "1";
res.locals.currentUrl = new URL(req.protocol + "://" + req.get("host") + req.originalUrl);
next();
}

0 comments on commit 957e6e4

Please sign in to comment.