{"action":"created","issue":{"url":"https://api.github.com/repos/ericf/express-handlebars/issues/117","labels_url":"https://api.github.com/repos/ericf/express-handlebars/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/ericf/express-handlebars/issues/117/comments","events_url":"https://api.github.com/repos/ericf/express-handlebars/issues/117/events","html_url":"https://github.com/ericf/express-handlebars/issues/117","id":64234671,"number":117,"title":"registerHelper","user":{"login":"babiz","id":5087350,"avatar_url":"https://avatars.githubusercontent.com/u/5087350?v=3","gravatar_id":"","url":"https://api.github.com/users/babiz","html_url":"https://github.com/babiz","followers_url":"https://api.github.com/users/babiz/followers","following_url":"https://api.github.com/users/babiz/following{/other_user}","gists_url":"https://api.github.com/users/babiz/gists{/gist_id}","starred_url":"https://api.github.com/users/babiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babiz/subscriptions","organizations_url":"https://api.github.com/users/babiz/orgs","repos_url":"https://api.github.com/users/babiz/repos","events_url":"https://api.github.com/users/babiz/events{/privacy}","received_events_url":"https://api.github.com/users/babiz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ericf/express-handlebars/labels/support","name":"support","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-25T10:13:04Z","updated_at":"2015-04-06T08:17:54Z","closed_at":"2015-03-25T15:01:27Z","body":"I could not get registerHelper working with this. Could you please show me how to registerHelper. I am trying to use it with i18n module."},"comment":{"url":"https://api.github.com/repos/ericf/express-handlebars/issues/comments/89972207","html_url":"https://github.com/ericf/express-handlebars/issues/117#issuecomment-89972207","issue_url":"https://api.github.com/repos/ericf/express-handlebars/issues/117","id":89972207,"user":{"login":"gzurbach","id":795927,"avatar_url":"https://avatars.githubusercontent.com/u/795927?v=3","gravatar_id":"","url":"https://api.github.com/users/gzurbach","html_url":"https://github.com/gzurbach","followers_url":"https://api.github.com/users/gzurbach/followers","following_url":"https://api.github.com/users/gzurbach/following{/other_user}","gists_url":"https://api.github.com/users/gzurbach/gists{/gist_id}","starred_url":"https://api.github.com/users/gzurbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzurbach/subscriptions","organizations_url":"https://api.github.com/users/gzurbach/orgs","repos_url":"https://api.github.com/users/gzurbach/repos","events_url":"https://api.github.com/users/gzurbach/events{/privacy}","received_events_url":"https://api.github.com/users/gzurbach/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T08:17:54Z","updated_at":"2015-04-06T08:17:54Z","body":"@babiz Did you figure out how to create your helper? I tried the following but it doesn't seem to work:\r\n```javascript\r\n// Configure i18n\r\ni18n.configure({\r\n    locales: ['en', 'fr'],\r\n    defaultLocale: 'en',\r\n    directory: __dirname + '/locales'\r\n});\r\napp.use(i18n.init);\r\n\r\n// Configure view engine\r\nvar hbs = expressHandlebars.create({\r\n    extname: '.hbs',\r\n    layoutsDir: path.join(__dirname, 'views/email'),\r\n    defaultLayout: 'layout',\r\n    helpers: {\r\n        i18n: function () { return i18n.__.apply(this, arguments); }\r\n    }\r\n});\r\n```\r\nI'm very close since i18n is being called but it doesn't seem to know what is the current locale. Right now I have everything in English even after forcing the locale to be French."}}