feat(localization): add localization for static strings

This commit is contained in:
David Litvak
2017-11-01 15:37:15 +01:00
committed by Benedikt Rötsch
parent eaec09a594
commit 68a8052bdf
24 changed files with 333 additions and 99 deletions

View File

@@ -1,3 +1,4 @@
const { translate } = require('../i18n/i18n')
/**
* Renders imprint page when `/imprint` route is requested
* @param request - Object - Express request
@@ -6,6 +7,7 @@
* @returns {undefined}
*/
module.exports.getImprint = (request, response, next) => {
response.render('imprint', { title: 'Imprint' })
response.render('imprint', {
title: translate('imprintLabel', response.locals.currentLocale.code)
})
}