What's the best way to handle existing translations with Localazy CLI?
Localazy CLI provides several methods for importing existing translations:
- Use autodetectLang variable to automatically detect language from file paths/names
- Explicitly specify languages in your configuration
- Use groups to separate source language uploads from existing translations
Basic configuration can look like this:
{
"upload": {
"files": [
{
"pattern": "src/locales/en/*.json",
"lang": "inherited"
},
{
"group": "existing",
"pattern": "src/locales/*/*.json",
"excludes": ["src/locales/en/*.json"],
"lang": "${autodetectLang}"
}
]
}
}This setup lets you run localazy upload for regular source updates and localazy upload existing for one-time import of existing translations.
Was this article helpful?
Please help us with improving our documentation.
We appreciate all your feedback.
Category
Last updated
04/02/2025