Marcus Spiegel
Marcus Spiegel
maybe you could outline your use case a bit more?
probably... thing is that some template engines handle parameter passing differently: ``` js ${__('Hello')} ``` ``` js ${__('Hello {{name}}', { name: 'Marcus' })} ``` from handlebars docs http://handlebarsjs.com/expressions.html > Handlebars...
you should not use any global singleton assignments on webservers, right? When a language depends on a request, it should always get read from that request - not from the...
there is an config option to let i18n update translations files on-the-fly: ``` // whether to write new locale information to disk - defaults to true updateFiles: false, ``` so...
read + write will be part of pluggable storage api, which might get faced somewhere after 0.10.0. We'll start a bigger refactor by splitting i18n into modules which will lead...
should do - feel free to push a PR
`i18n.init` is intended to be used as http middleware. In case of socket.io there won't exist any request.header I guess? So you will need to mimic the `init` by yourself....
fyi: I started working on a socket.io example last week
:+1: well done - implemented as intended with i18n.init inside connection callback. So i18n binds to both express + socket.io. Keep in mind that express.req won't share any state with...
btw. anyone tried with .use()? http://socket.io/docs/server-api/#namespace#use(fn:function):namespace ``` var io = require('socket.io')(); io.use(function(socket, next){ i18n.init(socket.request); next(); }); ```