How to upload existing languages?

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:

  1. Create a new upload group and name it existing for example
  2. Add a pattern where to find your translated files
  3. If your source language is contained in the pattern, exclude it using excludes parameter.
  4. 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.

1 Like

Hi, I’ve followed these instructions and the CLI reports it processes both the inherited and existing files successfully. But when I go to the Translations tab in the app only my inherited language is shown.

Is there some other step/action I need to take for my existing language translations to appear?

Thanks!

Hi, thanks for posting!
There shouldn’t be anything else needed.
If you could tell us which project is that, and give us an example of your localazy.json file, we will try to help.