Configuring translations

translate command comes with a highly flexible configuration to enable your translations in all use cases. Let's take a look at them:

Config KeyTypeRequiredDefault ValueDescription
project-idinteger \ stringyesnullThis is the continuous project ID given to you by MotaWord.
source-directorystringyesnullThe base directory for motaword CLI to start looking for source files. The actual source file detection can be managed by rules configuration. All rules are based on this source directory.
translations-directorystringnosource-directory/{locale}The base directory for motaword CLI to start placing your translated files. The translated file patterns rules configuration will be based on this directory. Can be same with source-directory. By default, we will put translations in each {locale} directory under source-directory. Beware, the default value is probably not the correct way in your case.
rulesJSON Map {string: string}yes{ "**/*" : "{path}/{basename}" }List of glob-like file path patterns to specify your source files and how to place their translated versions. See below for more available variables, detailed explanation and examples.
exclude-rulesJSON Array [string]no[]List of glob-like excluded source file patterns. We will skip these files during translation.