mirror of https://gitgud.io/fatchan/jschan.git
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
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();
|
|
},
|
|
|
|
};
|
|
|