Hi there,
first of all thanks for building this great, easy-to-use CMS. I have picked it for the blogging and CMS needs at my company and I've got the basic setup working.
I tried to use an individual installation (via docker) for each of the 3 languages I need to support, but this used quite a lot of memory, so I am now back to a single install with different content trees per language (say /es/blog, /it/blog…).
I have not succeed then in setting the i18n locale depending on the path which is requested. I tried with a middleware function but I don't seem to have access to setLocale or getLocale as in the
npm module docs.
I would like something similar to what John Resig describes
here:
app.use(function(req, res, next) {
req.i18n = new i18n(/* options... */);
next();
});
And that this is applied in the nunjucks templates.
I don't want to rely on cookie only because first-time visitors will not have it yet.
Does anyone have an idea on how to achieve this?
Thanks,
Arnau