I was following Ocombe's ng2-translate example Plunker link. I see that it is example of System.js
System.config({
//use typescript for compilation
transpiler: 'typescript',
//typescript compiler options
typescriptOptions: {
emitDecoratorMetadata: true
},
paths: {
'npm:': 'https://unpkg.com/'
},
//map tells the System loader where to look for things
map: {
'app': "./src",
'ng2-translate': 'npm:ng2-translate',
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
..........
..........
}
How do I configure ng2-translate with webpack? Where I have to mention the en.json and fr.json files path (path-src/main/app/assets/i18n/.json) in webpack configuration files?
http://localhost:3000/#/assets/i18n/en.jsonin console whereng2-translateservice is checking file and make sure that file exists at that place. As you are usingwebpackmay be you forgot to copy that files in you build folder. - ranakrunal9