Closed yodutouf closed 9 years ago
To avoid any future conflict, you should put that i18n on this.app
, hapi's docs mention explicitly it's the only safe place to put state. Also there's no CI but I doubt the tests will pass with those modifications.
I replace the server.ext('onPreHandler') by a server.decorate as suggested by @Marsup
The server.decorate adds a i18n function to the request.
So, with this update, use request.i18n().('key') while before it was request.i18n.('key')