{"action":"created","issue":{"url":"https://api.github.com/repos/i18next/i18next/issues/636","repository_url":"https://api.github.com/repos/i18next/i18next","labels_url":"https://api.github.com/repos/i18next/i18next/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next/issues/636/comments","events_url":"https://api.github.com/repos/i18next/i18next/issues/636/events","html_url":"https://github.com/i18next/i18next/issues/636","id":144912430,"number":636,"title":"Synchronous init?","user":{"login":"megapctr","id":4096683,"avatar_url":"https://avatars.githubusercontent.com/u/4096683?v=3","gravatar_id":"","url":"https://api.github.com/users/megapctr","html_url":"https://github.com/megapctr","followers_url":"https://api.github.com/users/megapctr/followers","following_url":"https://api.github.com/users/megapctr/following{/other_user}","gists_url":"https://api.github.com/users/megapctr/gists{/gist_id}","starred_url":"https://api.github.com/users/megapctr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megapctr/subscriptions","organizations_url":"https://api.github.com/users/megapctr/orgs","repos_url":"https://api.github.com/users/megapctr/repos","events_url":"https://api.github.com/users/megapctr/events{/privacy}","received_events_url":"https://api.github.com/users/megapctr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/i18next/i18next/labels/feature%20request","name":"feature request","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-31T14:07:37Z","updated_at":"2016-04-04T08:58:33Z","closed_at":"2016-04-04T08:58:33Z","body":"Hi, is there a proper way to initialize i18next synchronously?\r\n\r\nI import my translations from a json file (via webpack), so they're available instantly. Therefore I'd expect `i18n.t` to be ready to use as soon as `i18n.init` is called. Instead, I have to wait for callback to be called.\r\n\r\nBy browsing through the source code, I came up with this:\r\n\r\n<pre>\r\ni18n.init({\r\n    resources: translations,\r\n    lng: language,\r\n    ...\r\n})\r\n<b>i18n.changeLanguage(language)</b>\r\n</pre>\r\n\r\nIt's more of a hack than a solution -- is there a proper way to do this?"},"comment":{"url":"https://api.github.com/repos/i18next/i18next/issues/comments/205201200","html_url":"https://github.com/i18next/i18next/issues/636#issuecomment-205201200","issue_url":"https://api.github.com/repos/i18next/i18next/issues/636","id":205201200,"user":{"login":"megapctr","id":4096683,"avatar_url":"https://avatars.githubusercontent.com/u/4096683?v=3","gravatar_id":"","url":"https://api.github.com/users/megapctr","html_url":"https://github.com/megapctr","followers_url":"https://api.github.com/users/megapctr/followers","following_url":"https://api.github.com/users/megapctr/following{/other_user}","gists_url":"https://api.github.com/users/megapctr/gists{/gist_id}","starred_url":"https://api.github.com/users/megapctr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megapctr/subscriptions","organizations_url":"https://api.github.com/users/megapctr/orgs","repos_url":"https://api.github.com/users/megapctr/repos","events_url":"https://api.github.com/users/megapctr/events{/privacy}","received_events_url":"https://api.github.com/users/megapctr/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T08:58:33Z","updated_at":"2016-04-04T08:58:33Z","body":"Works, thanks :)"}}