Closed jonaslund closed 8 years ago
you might not need to use the languagedetector if setting it yourself - or remove you setting it and let the detector do its job: https://github.com/i18next/i18next-express-middleware#detector-options (enabling the path in order array)
I was misunderstanding the logic, and thought that
req.i18n.changeLanguage(newlan);
would set the language and keep it in a session, which is not the default behaviour, and the
req.i18n.changeLanguage(newlan);
needs to be called directly before rendering any output
Hi
Nice middleware!!
Question.
Trying to set the current language through this
But it doesn't work? This how I initialise i18n
what am I missing?