mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 14:28:10 -05:00
make it possible to hide a lng
This commit is contained in:
parent
4a19d6731a
commit
fd8221b869
2 changed files with 6 additions and 5 deletions
|
@ -141,7 +141,7 @@ module.exports = (app)->
|
||||||
|
|
||||||
app.use (req, res, next)->
|
app.use (req, res, next)->
|
||||||
subdomain = _.find Settings.i18n.subdomainLang, (subdomain)->
|
subdomain = _.find Settings.i18n.subdomainLang, (subdomain)->
|
||||||
subdomain.lngCode == req.showUserOtherLng
|
subdomain.lngCode == req.showUserOtherLng and !subdomain.hide
|
||||||
res.locals.recomendSubdomain = subdomain
|
res.locals.recomendSubdomain = subdomain
|
||||||
res.locals.currentLngCode = req.lng
|
res.locals.currentLngCode = req.lng
|
||||||
next()
|
next()
|
||||||
|
|
|
@ -19,6 +19,7 @@ footer.site-footer
|
||||||
ul.dropdown-menu(role="menu")
|
ul.dropdown-menu(role="menu")
|
||||||
li.dropdown-header #{translate("language")}
|
li.dropdown-header #{translate("language")}
|
||||||
each subdomainDetails, subdomain in settings.i18n.subdomainLang
|
each subdomainDetails, subdomain in settings.i18n.subdomainLang
|
||||||
|
if !subdomainDetails.hide
|
||||||
li.lngOption
|
li.lngOption
|
||||||
a.menu-indent(href=subdomainDetails.url+currentUrl)
|
a.menu-indent(href=subdomainDetails.url+currentUrl)
|
||||||
img(src="/img/flags/24/#{subdomainDetails.lngCode}.png")
|
img(src="/img/flags/24/#{subdomainDetails.lngCode}.png")
|
||||||
|
|
Loading…
Reference in a new issue