All file paths are relative to the location of the config file.
sourceLocale
string
Required
Locale code that templates in the source code are written in.
targetLocales
string[]
Required (can be empty)
Locale codes that templates will be localized to.
inputFiles
string[]
Required unless tsConfig is specified
Array of filenames or glob patterns matching the JavaScript or TypeScript files to extract messages from.
If both tsConfig and inputFiles are specified, then inputFiles takes precedence.
tsConfig
string
Required unless inputFiles is specified
Path to a tsconfig.json or jsconfig.json file that describes the JavaScript or TypeScript files from which messages will be extracted, and also the compiler options that will be used when building for transform mode.
If both tsConfig and inputFiles are specified, then inputFiles takes precedence.
output.mode
"transform" | "runtime"
Required
What kind of output should be produced. See modes.
output.localeCodesModule
string
Optional
Filepath for a generated JavaScript or TypeScript module that exports sourceLocale, targetLocales, and allLocales using the locale codes from your config file. Use to keep your config file and client config in sync.
This path should end with either ".js" or ".ts". If it ends with ".js" it will be emitted as a JavaScript module. If it ends with ".ts" it will be emitted as a TypeScript module.
interchange.format
"xliff" | "xlb"
Required
Data format to be consumed by your localization process. Options:
Output directory for generated modules. A <locale>.[js|ts] file is generated for each targetLocale. Each file is a module that exports the translations for that locale, keyed by message ID.
output.language
"js" | "ts"
Defaults to "js", or "ts" if tsConfig was specified.
Required unless tsConfig is specified, in which case it defaults to that file's outDir. If both are specified, this field takes precedence.
Output directory for generated modules. A subdirectory is created for each locale within this directory, each containing a full build of the project for that locale.
Directory on disk to read/write .xlf XML files. For each target locale, the path <xliffDir>/<locale>.xlf will be used.
interchange.placeholderStyle
"x" | "ph"
Defaults to "x"
How to represent placeholders containing HTML markup and dynamic expressions. Different localization tools and services have varying support for placeholder syntax.