+
+ providers: [
+ {
+ provide: TRANSLATIONS,
+ useFactory: (locale: string) => {
+ // Default locale, nothing to translate
+ const completeLocale = getCompleteLocale(locale)
+ if (isDefaultLocale(completeLocale)) return ''
+
+ const fileLocale = buildFileLocale(locale)
+ return require(`raw-loader!../locale/angular.${fileLocale}.xlf`)
+ },
+ deps: [ LOCALE_ID ]
+ },
+ { provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }
+ ]