jamuhl/i18next-node — pull request #108 by marcbachmann (2013-08-18 13:43:56+00:00)
Title: add settings for cookie domain.

In some use cases there is a need to set the domain of the cookie to ".yourdomain.com". (to support all subdomains)
Only a small change is needed to support the __cookieDomain__ option.

You can use that config like other options in the i18next.init function.

i18n.init({
cookieName: "lang",
cookieDomain: ".yourdomain.com",
ns: { namespaces: ['ns.common', 'ns.special'], defaultNs: 'ns.special'},
resSetPath: 'locales/__lng__/new.__ns__.json',
saveMissing: true,
debug: true,
sendMissingTo: 'fallback'
});

There is no need of a value fallback in the code because the domain option is ignored when it's null or undefined.