hyperlocalise lokalise upload translations --poll to import an existing
locale file and wait for Lokalise to finish processing it. Without --poll, a
successful command means the import was queued, not completed.
Before you start
Install Hyperlocalise and setLOKALISE_API_TOKEN for a token with project access. Use a project with the source
file already uploaded and a French target locale. Prepare locales/fr.json with
translated values. Replace your-project-id below with the real project ID.
iso value as --target-locale. Lokalise matches files
by name: use the same naming pattern as the source. A completely different name
can create a second file.
Preview, then import
finished. The default poll timeout is
30 seconds; 10m gives CI more time. A timeout does not establish that the remote
import was cancelled. Check the process in Lokalise before retrying an upload.
Will this replace existing translations?
By default,--replace-modified is off, preserving translations that Lokalise
classifies as modified. This is not a promise that every existing key stays
unchanged. Add --replace-modified only when you intend to replace those modified
translations with values from the uploaded file.
The command reports modified_translations=preserved or
modified_translations=replaced. Waiting with --poll changes completion timing,
not this replacement policy.
Verify the import
Review the imported locale in Lokalise. You can also export it to a new file:--target-locale determines
the import language even when the filename suggests another locale. Run a separate
upload for each target language; repeat --file for multiple files in one language.
See Lokalise CLI workflows for comparison with lokalise2
and JSON translation to generate drafts locally.
