Supported placeholders
{{source}}: source locale{{target}}: target locale{{localeDir}}: empty for source locale output, otherwise target locale
Examples
JSON locale files
Locale template with [locale] token
Mintlify recursive mapping with globs
source=en and targets fr, es, and zh:
target=enresolvesdocs/{{localeDir}}/cli/index.mdxtodocs/cli/index.mdxtarget=frresolvesdocs/{{localeDir}}/cli/index.mdxtodocs/fr/cli/index.mdxtarget=esresolvesdocs/{{localeDir}}/cli/index.mdxtodocs/es/cli/index.mdxtarget=zhresolvesdocs/{{localeDir}}/cli/index.mdxtodocs/zh/cli/index.mdx
docs/cli/ and translated pages should be written into the same relative paths under each locale folder.
Good patterns
- Keep source and target trees separate.
- Use stable bucket names by domain (
ui,marketing,emails). - Keep one responsibility per file mapping.
Anti-patterns
- Writing
topaths back into source directories. - Reusing the same output path for multiple buckets.
- Mixing locale tokens with ad-hoc string replacement outside templates.
Quick checks
Before running:- confirm
fromresolves for source locale, - confirm
tocan be created for each target locale, - run
hyperlocalise run --dry-runto inspect planned tasks.
Cloud path aliases
Usecloud_path when a file’s path in Hyperlocalise Cloud differs from its local
path. For example, you can move files within your repository or share a config
across several apps while keeping existing Cloud paths and translations.
sync push reads apps/web/locales/en.json and uploads it as
locales/en.json. For a French target, sync pull retrieves the translation for
that Cloud path and writes it to apps/web/locales/fr.json.
Recursive aliases preserve nested folders. The guides mapping uploads
content/guides/en/setup/install.md as guides/en/setup/install.md.
To reuse existing translations, keep the same Cloud project and set cloud_path
to the file’s exact existing source path. Changed source content still follows
your project’s normal translation workflow. If you omit cloud_path, sync uses
the local source path relative to the config directory.
Cloud path aliases follow these rules:
- Use a relative path with forward slashes and no empty,
.or..segments. - Use
{{source}}for the source locale; target locale placeholders are not supported. - Keep the source file extension and the same glob suffix as
from. - Give distinct local files distinct Cloud paths. Sync rejects collisions before sending requests.
from and to paths remain relative to your config directory. cloud_path
only affects Cloud sync; local run, check, status, and pack commands keep
using the local paths.
