Unverified Commit 15bca54b authored by Seyed Sajad Kahani's avatar Seyed Sajad Kahani Committed by GitHub

fix: change language in edit, history and source pages (#2194)

* change language in edit, history and source pages * fix: remove unnecessary i18n locale switch for download page Co-authored-by: 's avatarNicolas Giard <github@ngpixel.com>
parent 5aa959ee
......@@ -107,6 +107,8 @@ router.get(['/e', '/e/*'], async (req, res, next) => {
return res.redirect(`/e/${pageArgs.locale}/${pageArgs.path}`)
}
req.i18n.changeLanguage(pageArgs.locale)
// -> Set Editor Lang
_.set(res, 'locals.siteConfig.lang', pageArgs.locale)
_.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl')
......@@ -238,6 +240,8 @@ router.get(['/h', '/h/*'], async (req, res, next) => {
return res.redirect(`/h/${pageArgs.locale}/${pageArgs.path}`)
}
req.i18n.changeLanguage(pageArgs.locale)
_.set(res, 'locals.siteConfig.lang', pageArgs.locale)
_.set(res, 'locals.siteConfig.rtl', req.i18n.dir() === 'rtl')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment