Created
October 10, 2019 10:42
-
-
Save CharlieGreenman/cce34fca7af64ce0aa9df7f7316358f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { enableProdMode, TRANSLATIONS, TRANSLATIONS_FORMAT } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
if (environment.production) { | |
enableProdMode(); | |
} | |
// use the require method provided by webpack | |
declare const require; | |
// we use the webpack raw-loader to return the content as a string | |
const translations = require('raw-loader!./locale/messages.fr.xlf').default; | |
platformBrowserDynamic().bootstrapModule(AppModule, { | |
providers: [ | |
{provide: TRANSLATIONS, useValue: translations}, | |
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'} | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment