jschan - Anonymous imageboard software. Classic look, modern features and feel. Works without JavaScript and supports Tor, I2P, Lokinet, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
503 B

'use strict';
const i18n = require(__dirname+'/../../locale/locale.js')
, config = require(__dirname+'/../../misc/config.js');
module.exports = {
setGlobalLanguage: (req, res, next) => {
// global settings locale
const { language } = config.get;
res.locals.setLocale(res.locals, language);
next();
},
setBoardLanguage: (req, res, next) => {
// board settings locale
const language = res.locals.board.settings.language;
res.locals.setLocale(res.locals, language);
next();
},
};