Uploading existing languages is pretty straightforward.
There’s only a couple of tweaks need to make it work along with your source files.
Let’s assume you store all your languages in the locales
folder:
- Create a new upload group and name it existing for example
- Add a pattern where to find your translated files
- If your source language is contained in the pattern, exclude it using excludes parameter.
- Specify the language. Luckily, Localazy autodetects the language code and stores it in ${autodetectLang} variable
Here’s the full config:
{
"writeKey": "your-write-key",
"readKey": "your-read-key",
"upload": {
"type": "json",
"files": [
{
"pattern": "locales/en.json",
"lang": "inherited",
},
{
"group": "existing",
"pattern": "locales/*.json",
"excludes": [
"locales/en.json"
],
"lang": "${autodetectLang}",
}
]
},
"download": {
"files": "locales/${lang}.json"
}
}
After running localazy upload existing
. Existing translations will be uploaded.