NeoIQ Localize

Configuration

NeoIQ Localize reads neoiq-localize.json from your current working directory. The init command generates this file, and all CLI commands use it to determine what to translate and where to write outputs.


Basic configuration

neoiq-localize.json
{
  "locale": {
    "source": "en",
    "targets": ["es", "fr", "de"]
  },
  "files": {
    "json": {
      "include": ["src/locales/[locale].json"]
    }
  }
}

Locale configuration

  • locale.source: your primary language (for example, en)
  • locale.targets: locales you want to translate into (for example, ["es", "fr"])

Supported locale codes include simple codes (en, fr) and region-specific codes (pt-BR, zh-CN, zh-TW).


File configuration

The files object maps a format name to one or more file patterns. Each pattern must include the [locale] placeholder so NeoIQ Localize can swap in the source and target locales.

Multiple formats
{
  "locale": {
    "source": "en",
    "targets": ["es", "fr"]
  },
  "files": {
    "json": {
      "include": ["src/messages/[locale].json"]
    },
    "mdx": {
      "include": ["docs/[locale]/*.mdx"]
    }
  }
}

Patterns can be strings or objects:

{
  "files": {
    "json": {
      "include": [
        "src/locales/[locale].json",
        { "glob": "src/marketing/[locale]/*.json" }
      ]
    }
  }
}

Platform examples:

{
  "files": {
    "xcode-xcstrings": {
      "include": ["ios/Localizable.xcstrings"]
    },
    "android": {
      "include": ["android/app/src/main/res/values-[locale]/strings.xml"]
    }
  }
}

Supported formats

NeoIQ Localize supports many formats. Here are the most common ones:

See the full list in Formats.


Project ID and overrides

You can provide the project ID in any of these ways:

  • projectId in neoiq-localize.json
  • NEOIQ_LOCALIZE_PROJECT_ID environment variable (also read from .env)
  • --project-id flag on the CLI

The CLI will also use NEOIQ_LOCALIZE_API_KEY (or --api-key) for authentication.


Lock file

NeoIQ Localize maintains neoiq-localize.lock to track what source content has already been translated. This lets translate only process new or changed keys.

Commit neoiq-localize.lock to your repo. You do not need to edit it manually.


Common scenarios

  • Monorepos: run the CLI inside the folder that contains neoiq-localize.json (or set working-directory in the GitHub Action).
  • Adding a new locale: update locale.targets, then run translate --force <locale> to backfill existing keys.

How is this guide?

Edit on GitHub

Last updated on

On this page