Configuration
This CLI can be configured by creating a file called i18nhero.config.json in the root of your project.
{
"project_id": "ID-OF-PROJECT",
"output": {
"path": "lang",
"format": "json",
"keep_empty_fields": false,
"flat": false,
},
}
project_id
Used to define the linked project.
output
Configuration for downloading and uploading locale files.
path
Defines where locale files should be downloaded to, and uploaded from.
format
Defines the file format used when uploading and downloading locale files.
keep_empty_fields
Defines whether identifiers that are missing translations should be downloaded.
flat
Defines whether the locale files should be a flat string <-> string map or a multi layered map.
A point (.) in the identifier name is used to define multi-layered keys when flat is set to false.
The identifier pages.dashboard.title will be expanded to the following:
{
"pages": {
"dashboard": {
"title": ""
}
}
}