Marcus Spiegel

Results 138 comments of Marcus Spiegel

This is exactly how I planed to Support storage modules. 1.0.0 should be refactored to es6, split up into modules and provide a pluggable storage api. Still that side project...

use `i18n.getLocales()` https://github.com/mashpie/i18n-node#i18ngetlocales and pass the result to `locals` of your view. for one view only ```js app.get('/setlanguage', (req, res) => { res.render('languagesetting', { languages: i18n.getLocales() }); }); ``` or...

erm, I think the easiest way is adding those to your translations like en.json ```js { "en": "english", "de": "german" } ``` de.json ```js { "en": "Englisch", "de": "Deutsch" }...

You'll need to wrap the passport handler within an express route handler. I din't try out myself, but I guess it'll look something like this: ```js router.post('/login', (req, res) =>...

nested backreferences are not supported out-of-the-box. But you might implement that with a little effort by using https://github.com/mashpie/i18n-node#i18ngetcatalog to fetch all translations combined with mustache or sprintf (https://github.com/mashpie/i18n-node#mustache-support).

> The problem I'm running into is I don't want to use the global i18n as I'm worried it's state may be changed by other requests... True, absolutely. i18n has...

`configure` will entirely overwrite any previous settings and will reread all files again, etc. You should try to implement either extra instances of i18n or register all object in advance....

No, I'm afraid this is not expected behaviour. The `defaultLocale` get's forcibly overwritten by your locale parameter `i18n.__({ phrase: translationId, locale: 'en' });`. This is how passing locale parameters should...

will need to review #128 #255