A modified version of the application showcased in Deploying an i18n Angular app with angular-cli.
Translation messages are keyed and stored in the src/i18n/lang folder. They're then populated in the generated message files with xlf-translate.
Run with:
ng serve --aot --locale=es --i18n-file=src/i18n/messages.es.xlf --i18n-format=xlf
Extract new messages with:
npm run extract-i18n
Populate keyed translated messages with:
npm run translate-i18n