Synchronize translation files between your repository and Locize. It uses the Locize CLI behind the scene. For detailed documentation of the Locize CLI, please visit the documentation.
Required The api-key that should be used.
Required The project-id that should be used.
Optional Specify the path that should be used (default: current working directory).
Optional The version that should be targeted (default: latest).
Optional File format of namespaces (default: json; [nested, flat, xliff2, xliff12, xlf2, xlf12, android, yaml, yaml-rails, yaml-rails-ns, yaml-nested, yml, yml-rails, yml-nested, csv, xlsx, po, strings, resx, fluent, tmx, laravel, properties, xcstrings]).
Optional Removes all local files by removing the whole folder before downloading (default: false).
Optional Removes all local files without removing any folder (default: false).
Optional Update values of existing translations on locize (default: false).
Optional Trigger automatic AI/MT translation of updated translations (default: false). When enabled, any new or updated keys synced to the reference language will be automatically translated into all target languages using the project's configured AI or MT provider.
Optional Skip the removal of keys on locize that were deleted locally (default: false).
Optional Delete a complete namespace on locize if the local file in the reference language was deleted (default: false).
Optional Skips to download empty files (default: false).
Optional Check for changes in reference language only (default: true).
Optional Take file modification time into account when comparing local and remote (default: false).
Optional The language that should be targeted.
Optional Comma-separated list of languages that should be targeted.
Optional The namespace that should be targeted (comma-separated list supported).
Optional This will be added as a local folder name prefix in front of the language.
Optional This will define the folder and file structure; do not add a file extension (default: {{language}}/{{namespace}}).
Optional Downloads the current (unpublished) translations. This will generate private download costs (default: false).
Optional Downloads only the current overridden (unpublished) translations of a tenant or branch project (default: false).
Optional The branch name (or id) that should be targeted.
Optional Dry run — show what would change without actually syncing (default: false).
Optional Specify the cdn endpoint that should be used (standard or pro, default: standard).
Optional Saves the segments that will be deleted in this path.
- uses: locize/sync@v1
with:
api-key: ${{ secrets.LOCIZE_API_KEY }}
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
path: locales- uses: locize/sync@v1
with:
api-key: ${{ secrets.LOCIZE_API_KEY }}
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
path: locales
auto-translate: truesteps:
- uses: actions/checkout@v4
- uses: locize/sync@v1
with:
api-key: ${{ secrets.LOCIZE_API_KEY }}
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
path: locales
auto-translate: true
- run: npx locize-cli publish-version
env:
LOCIZE_API_KEY: ${{ secrets.LOCIZE_API_KEY }}
LOCIZE_PROJECTID: ${{ secrets.LOCIZE_PROJECT_ID }}- uses: locize/sync@v1
with:
api-key: ${{ secrets.LOCIZE_API_KEY }}
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
path: locales
branch: feature-v2