Guide
Crowdin
Sync locales/ with a Crowdin project using the Crowdin CLI and a crowdin.yml that matches the module's file layout.
Crowdin is a translation platform: you upload the default locale's files, translators work in Crowdin, and you download the other locales back. The module reads plain JSON files, so the Crowdin CLI only needs a crowdin.yml that maps locales/ and locales/pages/ correctly. No module setting changes.
Configure crowdin.yml
# crowdin.yml
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
base_path: ./locales
preserve_hierarchy: true
files:
- source: /en.json
translation: /%two_letters_code%.json
- source: /pages/**/en.json
translation: /pages/**/%two_letters_code%.json
enis your default locale; its files are the sources.project_id_env/api_token_envread the ID and token from environment variables, so no secret is committed.preserve_hierarchy: truekeepspages/<page>/folders as they are.- The translated file name must equal the locale
codeinnuxt.config.ts.%two_letters_code%fits codes likede; for codes likept-BRuse%locale%, or map Crowdin's codes to yours withlanguages_mapping.
Upload and download
npm install -g @crowdin/cli
export CROWDIN_PROJECT_ID=123456
export CROWDIN_PERSONAL_TOKEN=... # from Crowdin account settings
crowdin upload sources # push locales/en.json and locales/pages/**/en.json
crowdin download # write locales/de.json, locales/pages/**/de.json, ...
Run both in CI to keep files current. Downloaded files land in your repository like hand-edited ones; the next build or dev reload picks them up.
Before uploading
Clean the sources first so translators do not work on dead keys: i18n-micro clean removes unused keys, i18n-micro check reports gaps after a download. The CLI has no Crowdin integration of its own: this page is the supported way.