{"action":"created","issue":{"url":"https://api.github.com/repos/ocombe/ng2-translate/issues/11","labels_url":"https://api.github.com/repos/ocombe/ng2-translate/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/ocombe/ng2-translate/issues/11/comments","events_url":"https://api.github.com/repos/ocombe/ng2-translate/issues/11/events","html_url":"https://github.com/ocombe/ng2-translate/issues/11","id":125625071,"number":11,"title":"using in project","user":{"login":"samvloeberghs","id":231618,"avatar_url":"https://avatars.githubusercontent.com/u/231618?v=3","gravatar_id":"","url":"https://api.github.com/users/samvloeberghs","html_url":"https://github.com/samvloeberghs","followers_url":"https://api.github.com/users/samvloeberghs/followers","following_url":"https://api.github.com/users/samvloeberghs/following{/other_user}","gists_url":"https://api.github.com/users/samvloeberghs/gists{/gist_id}","starred_url":"https://api.github.com/users/samvloeberghs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvloeberghs/subscriptions","organizations_url":"https://api.github.com/users/samvloeberghs/orgs","repos_url":"https://api.github.com/users/samvloeberghs/repos","events_url":"https://api.github.com/users/samvloeberghs/events{/privacy}","received_events_url":"https://api.github.com/users/samvloeberghs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-08T14:46:40Z","updated_at":"2016-01-08T15:15:34Z","closed_at":"2016-01-08T14:59:21Z","body":"Hi,\r\n\r\nI'm trying to integrate this library in the starter kit provided by AngularClass:\r\nhttps://github.com/AngularClass/angular2-webpack-starter.\r\n\r\nhttps://github.com/AngularClass/angular2-webpack-starter/issues/208\r\n\r\nThe webpack dev server is serving from the `src` folder. The translations are defined in \r\n`src/assets/i18n`.\r\n\r\nIt doesn't seem to find the translation files using the provided setup:\r\n```\r\nexport class App {\r\n  name = 'Angular 2 Webpack Starter';\r\n  url = 'https://twitter.com/AngularClass';\r\n  constructor(translate: TranslateService) {\r\n\r\n    var prefix = 'assets/i18n';\r\n    var suffix = '.json';\r\n    translate.useStaticFilesLoader(prefix, suffix);\r\n\r\n    var userLang = navigator.language.split('-')[0]; // use navigator lang if available\r\n    userLang = /(nl|fr|en)/gi.test(userLang) ? userLang : 'en';\r\n\r\n    // optional, default is \"en\"\r\n    translate.setDefaultLang('en');\r\n\r\n    // the lang to use, if the lang isn't available, it will use the current loader to get them\r\n    translate.use(userLang);\r\n\r\n  }\r\n}\r\n```\r\n\r\nBut if I change the configuration to be `var prefix = 'src/assets/i18n';` it works.\r\n\r\nI'm not sure this is something related to your package or perhaps to the starter kit architecture. So that's why I'll post it and reference it in both projects.\r\n\r\nKr\r\nSam V."},"comment":{"url":"https://api.github.com/repos/ocombe/ng2-translate/issues/comments/170028549","html_url":"https://github.com/ocombe/ng2-translate/issues/11#issuecomment-170028549","issue_url":"https://api.github.com/repos/ocombe/ng2-translate/issues/11","id":170028549,"user":{"login":"ocombe","id":265378,"avatar_url":"https://avatars.githubusercontent.com/u/265378?v=3","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T15:15:34Z","updated_at":"2016-01-08T15:15:34Z","body":"\\o/\r\n\r\nDon't get too much into ng2-translate, the i18n official library by google for angular 2 looks very promising and they should do it before angular 2 release"}}