eloqnt/studiov0.5
Navigation

eloqnt/cli

eloqnt crowdin

Sync messages with an existing Crowdin project.

When localization is outgrowing your repo, a translation management system like Crowdin adds helpful features that enable non-developers to participate in the workflow:

  • Integration with 3rd-party services (Figma, CMS, …)
  • Collaboration with team members
  • Reviews of translations
  • Project-wide glossaries
  • Screenshots
  • … and more

Note that if you offload the translation step to Crowdin, you can still benefit from eloqnt lint and eloqnt review before translation work begins.

crowdin.yml

The sync is driven by a crowdin.yml file at your project root.

To authenticate the CLI, create a personal access token in your Crowdin account settings, make it available as CROWDIN_PERSONAL_TOKEN in your environment.

Then, map your messages to the Crowdin project:

crowdin.yml

project_id: '123456'
files:
- source: /messages/en.json
translation: /messages/%two_letters_code%.json

The file follows the Crowdin configuration and supports a subset of its options.

The supported options are:

  • Top-level: project_id, api_token, base_path, and base_url (each inline, via its _env variant, or via the ambient CROWDIN_* environment variables), plus preserve_hierarchy.
  • Per files entry: source, translation, type, ignore, update_option, and skip_untranslated_strings.

Unsupported options will either warn or error based on the severity.

Upload sources

After adding or changing source strings, push your source files to the Crowdin project.

Files are created on the first upload and updated in place afterwards:

eloqnt crowdin upload sources
messages/
en.json Created
✔ Uploaded 1 source file to Acme

Flags

--branchstringSync with this branch of the Crowdin project (created when missing)
--configstringPath to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs})
--jsonbooleanOutput the result as JSON

Upload translations

Seed the project with translations that already exist locally.

They arrive unapproved, so reviewers in Crowdin stay in charge:

eloqnt crowdin upload translations
messages/
de.json Uploaded
es.json Uploaded
✔ Uploaded 2 translation files to Acme

Flags

--branchstringSync with this branch of the Crowdin project
--localestringRestrict to these target languages (comma-separated)
--configstringPath to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs})
--jsonbooleanOutput the result as JSON

Download translations

Once translations are ready in Crowdin, pull them into your repo.

Downloading overwrites local translation files with Crowdin's version:

eloqnt crowdin download translations
messages/
de.json Updated
es.json Updated
✔ Downloaded 2 translation files from Acme

Flags

--branchstringSync with this branch of the Crowdin project
--localestringRestrict to these target languages (comma-separated)
--configstringPath to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs})
--jsonbooleanOutput the result as JSON