translate
command comes with a highly flexible configuration to enable your translations in all use cases. Let's take a look at them:
Config Key | Type | Required | Default Value | Description |
---|---|---|---|---|
project-id | integer \ string | yes | null | This is the continuous project ID given to you by MotaWord. |
source-directory | string | yes | null | The 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-directory | string | no | source-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. |
rules | JSON 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-rules | JSON Array [string] | no | [] | List of glob -like excluded source file patterns. We will skip these files during translation. |