Skip to main content

Configuration

The Multilocale CLI uses a multilocale.json file in your project root to store project settings.

multilocale.json

{
"projectId": "your-project-id",
"projectName": "your-project-name",
"format": "json",
"extension": ".json",
"header": "",
"postScript": ""
}

Fields

FieldTypeDescription
projectIdstringThe Multilocale project ID
projectNamestringThe project name (alternative to projectId)
formatstringOutput format: json, esm, js, cjs
extensionstringFile extension for translation files
headerstringText prepended to each generated file
postScriptstringShell command to run after the download command

Project Paths

In the Multilocale dashboard, you can configure paths on your project. These define where translation files are stored in your codebase.

Paths use %lang% as a placeholder for the language code:

translations/%lang%.json
src/locales/%lang%.json

When you run multilocale download, files are written to these paths. When you run multilocale import, files are read from these paths.

Output Formats

FormatDescriptionExample Output
jsonStandard JSON{ "key": "value" }
esmES moduleexport default { "key": "value" }
jsCommonJSmodule.exports = { "key": "value" }
cjsCommonJS (alias)module.exports = { "key": "value" }

Android Projects

For Android projects, the CLI automatically detects the res/ directory structure and reads/writes strings.xml files:

res/values/strings.xml          # Default language
res/values-es/strings.xml # Spanish
res/values-fr/strings.xml # French

No paths configuration is needed for Android projects.