If I have a node application in /path/to/myapp, with /path/to/myapp/app.js as the runner and /path/to/myapp/locales with i18n language definitions in, then i18n works if I:
however, if i start the app from outside the directory, i18n does not load up locales, searching within the current dir:
No languages will load in the 2nd instance.
for now you might want to change default setting of your directory, i.e.:
locales: ['en', 'de'],
Or just set that dynamic by using __dirname in your configure statement.
I'll leave that issue open as I think, using __dirname/locales as default setting sound like a good option.
I had a look at the source and saw the directory config option, which I did not come across in the documentation (i.e. reading the README file). It works great when setting it to __dirname/locales manually.
From an implementation, I agree that defaulting would be better to use __dirname/locales as default, as I am assuming most i18n users would use it this way.
agreed - 9 months later - sry for delay
using __dirname + '/locales' as default directory, closes #24, using …
…path.sep for seperator