NOTE: This will not work for dynamic translations as of now. For example:
...
{{ 'dynamic.translation.' + someVar | translate }}
...
A CLI application to manage translations in Angular projects.
$ ngx-translation-cli <command> <options>
This package is meant to be installed globally. Install it using the following command:
$ npm i -g ngx-translation-cli
This command allows you to export all keys within a translation file to stdout or an output file specified.
The -t
option is required, -o
is optional.
$ ngx-translation-cli keys -t <translation-file> -o <output-file>
This command will create a new translation file with only the used translations--essentially pruning all unused translations. This will print to stdout or you can specify an output file.
The -t
and -d
options are required, -o
is optional.
$ ngx-translation-cli prune -t <translation-file> -d <project-directory> -o <output-file>
This command will help you with understanding the commands available.
This command will output the current version of the CLI tool.