refactor(i18n): refactor & fix

This commit is contained in:
Matteo Pagliazzi
2014-03-10 19:36:07 +01:00
parent 62637cf676
commit b887127fb0
4 changed files with 20 additions and 12 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ var getManifestFiles = function(page){
}
module.exports.locals = function(req, res, next) {
var language = req.language;
var language = _.find(i18n.avalaibleLanguages, {code: req.language});
var isStaticPage = req.url.split('/')[1] === 'static'; // If url contains '/static/'
// Load moment.js language file only when not on static pages