Migrating an existing project
Most projects arriving here are already localized in some way. Run init and it walks you through the migration. Your existing translations are uploaded and kept, and they set the voice for everything translated after that. Once they are imported, the dashboard shows how many keys are still missing a translation, with a button to generate them in that same voice. What you already have is left untouched.
npx @localheroai/cli init
Your translations configure the project
Style settings are the part of setup nobody wants to fill in by hand, so the import does it for you. Your translations are the best available description of how your product speaks, and they are already written.
If the project has no style guide, tone of voice or length preference yet, Localhero.ai samples the imported source strings and writes all three. New translations follow them from the first run, so what comes out reads like the copy already in your repository rather than like generic machine translation.
Glossary terms work differently. Candidate terms are extracted from your translations and proposed as suggestions, which you accept or dismiss. Nothing enters your glossary without you agreeing to it.
Both run in the background once the import finishes, so give them a moment. Everything they produce is editable: start from what the import found, then tune the specifics as you go. Head over to your project settings to see what was extracted.
What import does
Import is step 6 of init. It uploads the translation files already in your repository.
Source files are imported first, then target files. An existing non-blank target translation becomes a stored translation with a version whose source is recorded as an import, so the dashboard shows where the text came from.
Import also handles keys that exist only in a target file and not yet in the source file. These get matched up against the source key rather than duplicated.
To skip the upload entirely, pass --skip-import:
npx @localheroai/cli init --skip-import
Later uploads use push, and the two commands differ on one point: init filters imported target files to the target locales you configured, while push uploads any target file matching your configured path and pattern.
How Localhero.ai decides what to translate
The rule is one check per key per language. A key is skipped when a translation already exists for that language and its content is non-blank. Everything else is sent for translation.
An empty string counts as missing and will be translated. If you keep placeholder entries with empty values in your target files, expect those to be filled in.
Keys that are already translated still appear in job results, marked completed, but they cost no credits. You are only charged for keys actually sent for translation, so bringing a large existing catalogue across is free.
Gettext projects
The target-first matching described above does not apply to .po and .pot files. For gettext the locale swap does not change the file extension, so a target file cannot be matched back to its source by path alone.
For gettext projects, keys are matched from the source catalog. Your existing translations are still imported and still kept, and the non-blank rule above applies unchanged.
Further reading: Project setup for configuring paths and locales, and the CLI reference for every command and flag.
Last updated
Ready to try it?
Get setup in a couple of minutes. No credit card required.