{"action":"created","issue":{"url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/266","labels_url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/266/comments","events_url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/266/events","html_url":"https://github.com/jamesarosen/ember-i18n/issues/266","id":93501448,"number":266,"title":"Lazy load translations via container inject","user":{"login":"zaubererty","id":309615,"avatar_url":"https://avatars.githubusercontent.com/u/309615?v=3","gravatar_id":"","url":"https://api.github.com/users/zaubererty","html_url":"https://github.com/zaubererty","followers_url":"https://api.github.com/users/zaubererty/followers","following_url":"https://api.github.com/users/zaubererty/following{/other_user}","gists_url":"https://api.github.com/users/zaubererty/gists{/gist_id}","starred_url":"https://api.github.com/users/zaubererty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaubererty/subscriptions","organizations_url":"https://api.github.com/users/zaubererty/orgs","repos_url":"https://api.github.com/users/zaubererty/repos","events_url":"https://api.github.com/users/zaubererty/events{/privacy}","received_events_url":"https://api.github.com/users/zaubererty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-07T10:43:29Z","updated_at":"2015-07-18T19:20:06Z","closed_at":null,"body":"I have seen that ember-i18n is using containers for the translations.\r\nWith ember-cli-i18n ist was possible to inject a container before the service was loaded or before the language was switched.\r\n```\r\nexport default {\r\n  name: 'load-locales',\r\n  before: 't',\r\n\r\n  initialize: function(container, app) {\r\n    var lang = $.cookie('user-lang');\r\n\r\n    if (lang === undefined || lang.length > 3) {  // no cookie exists yet\r\n      \tlang = navigator.language || navigator.userLanguage;\r\n      \tif (lang.length > 3){\r\n      \t\tvar langSplit = lang.split('-');\r\n      \t\tif (langSplit[0].length < 3){\r\n      \t\t\tlang = langSplit[0];\r\n      \t\t} else {\r\n      \t\t\tlang = 'en';\r\n      \t\t}\r\n      \t}\r\n    }\r\n    app.set('locale', lang);\r\n    $.cookie('user-lang', lang, {expires:365, path:'/'});\r\n\r\n..... <load data> .....\r\n\r\n    //console.log(objs);\r\n    container.register('locale:' + lang, objs, { singleton: true, instantiate: false });\r\n  }\r\n};\r\n```\r\n\r\nIs there a similar way in ember-i18n?"},"comment":{"url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/comments/122583053","html_url":"https://github.com/jamesarosen/ember-i18n/issues/266#issuecomment-122583053","issue_url":"https://api.github.com/repos/jamesarosen/ember-i18n/issues/266","id":122583053,"user":{"login":"jamesarosen","id":2406,"avatar_url":"https://avatars.githubusercontent.com/u/2406?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesarosen","html_url":"https://github.com/jamesarosen","followers_url":"https://api.github.com/users/jamesarosen/followers","following_url":"https://api.github.com/users/jamesarosen/following{/other_user}","gists_url":"https://api.github.com/users/jamesarosen/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesarosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesarosen/subscriptions","organizations_url":"https://api.github.com/users/jamesarosen/orgs","repos_url":"https://api.github.com/users/jamesarosen/repos","events_url":"https://api.github.com/users/jamesarosen/events{/privacy}","received_events_url":"https://api.github.com/users/jamesarosen/received_events","type":"User","site_admin":false},"created_at":"2015-07-18T19:20:06Z","updated_at":"2015-07-18T19:20:06Z","body":"Did you get this resolved?"}}