Options
Configuration Options for Transloco Keys Manager
CLI Options
--help -h
--help -hDisplays the help menu for the Transloco Keys Manager.
Extract Command
--config -c
--config -cDefines the root search directory for the Transloco configuration file. The default is process.cwd().
--project
--projectSpecifies the targeted project. Defaults to defaultProject. The sourceRoot of this project, retrieved from the angular.json file, prefixes the default input, output, and translationsPath properties. Ensure full paths are provided when overriding these options. The Transloco configuration file is also searched in the project's sourceRoot unless the config option is explicitly provided.
--input -i
--input -iSpecifies the source directory for all files using translation keys. Defaults to [${sourceRoot}/app'].
transloco-keys-manager extract -i src/my/path
transloco-keys-manager extract -i src/my/path,project/another/path --output -o
--output -o Specifies the target directory for generated translation files. Defaults to ${sourceRoot}/assets/i18n.
--fileFormat -f
--fileFormat -fSets the translation file format (json or pot). Defaults to json.
--langs -l
--langs -lDefines the languages for which translation files are generated. Defaults to [en].
--marker -m
--marker -mSpecifies the marker sign for dynamic values. Defaults to t.
--sort
--sortSort the keys using JavaScript’s sort() method. Defaults to false.
--unflat -u
--unflat -uDetermines whether to unflatten keys. Defaults to flat.
--defaultValue -d
--defaultValue -dDefines the default value for generated keys. Defaults to Missing value for {{key}}.
Supported replaceable placeholders:
{{key}}: Complete key, including the scope.{{keyWithoutScope}}: Key value without the scope.{{scope}}: The key's scope.{{params}}: Parameters used for the key.
--replace -r
--replace -r Replaces the contents of a translation file if it already exists. Defaults to false (merges files instead).
--remove-extra-keys -R
--remove-extra-keys -R Removes extra keys from existing translation files. Defaults to false.
--add-missing-keys -a
--add-missing-keys -aAdds missing keys identified by the detective. Defaults to false.
Find Command
--emit-error-on-extra-keys -e
--emit-error-on-extra-keys -eIt emits an error and exits the process if extra keys are found. Defaults to false.
--translationsPath -p
--translationsPath -pDefines the root directory path for translation files. Defaults to ${sourceRoot}/assets/i18n.
Last updated
Was this helpful?

