make it possible to hide a lng

This commit is contained in:
Henry Oswald 2014-08-21 17:58:25 +01:00
parent 4a19d6731a
commit fd8221b869
2 changed files with 6 additions and 5 deletions

View file

@ -141,7 +141,7 @@ module.exports = (app)->
app.use (req, res, next)->
subdomain = _.find Settings.i18n.subdomainLang, (subdomain)->
subdomain.lngCode == req.showUserOtherLng
subdomain.lngCode == req.showUserOtherLng and !subdomain.hide
res.locals.recomendSubdomain = subdomain
res.locals.currentLngCode = req.lng
next()

View file

@ -19,10 +19,11 @@ footer.site-footer
ul.dropdown-menu(role="menu")
li.dropdown-header #{translate("language")}
each subdomainDetails, subdomain in settings.i18n.subdomainLang
li.lngOption
a.menu-indent(href=subdomainDetails.url+currentUrl)
img(src="/img/flags/24/#{subdomainDetails.lngCode}.png")
| #{translate(subdomainDetails.lngCode)}
if !subdomainDetails.hide
li.lngOption
a.menu-indent(href=subdomainDetails.url+currentUrl)
img(src="/img/flags/24/#{subdomainDetails.lngCode}.png")
| #{translate(subdomainDetails.lngCode)}
each item in nav.left_footer
li