I am looking to implement a local switch at runtime in my Angular 2 application. I found the following Angular2 i18n language switch that contains a solution that uses SystemJS, https://plnkr.co/edit/JyE4l4TjEruuPsrbanmK . My application uses a web package. I try to use raw-loader to load my xlf file, but I get the message "Error: I can not find the module. / I 18n / messages.es.xlf". I think the problem may be related to this piece of code in the i18n-providers.ts file.
declare var System: any;
function getTranslationsWithSystemJs(file: string) {
return System.import(file);
}
What can I replace with the previous code when using webpack?
source
share