-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
We are currently trying to get our AOT build to work with i18n.
The Angular i18n docs (https://angular.io/guide/i18n) say ngc needs some arguments to make AOT include translation files:
./node_modules/.bin/ngc --i18nFile=./locale/messages.es.xlf --locale=es --i18nFormat=xlf
We found that NgcWebpackPlugin has an option called cliOptions that gets transformed to a instance of NgcCliOptions. So we tried to configure NgcWebpackPlugin in our webpack config as follows:
new ngcWebpack.NgcWebpackPlugin({
disabled: !AOT,
tsConfig: helpers.root('tsconfig.webpack.json'),
resourceOverride: helpers.root('config/resource-override.js'),
cliOptions: {
i18nFormat: 'xtb',
i18nFile: './i18n/messages.en.xtb',
locale: 'en',
}
})
But nothing happens... no error but also no translations. Are we missing something? Is anything wrong with options object? We couldn't find any examples out there. Or is there anything else we need to do or include to get translations compiled into the AOT build?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels