I'm using angular's i18n tools and have moved the messages.xlf output to a different folder than the default location (a new directory: \app\locale), as suggested.
When I rerun
>npm run i18n
even in the newly added app/locale directory, the messages.xlf file is output to the default location.
How can I specify where the output messages.xlf file is output to prevent having to move it around each time I regenerate it?
You can add a new option to your tsconfig.json to tell the angular compiler where to output the file.
{
"compilerOptions": {
//your normal options...
},
"angularCompilerOptions": {
"genDir": "./app/locale"
}
}
When you execute the i18n program make sure to include the tsconfig.json location.
node_modules\.bin>ng-xi18n -p ../../src/tsconfig.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With