.json and .lottie.
.json: the CLI detects Lottie by content. A.jsonfile whose root hasv,fr,ip,op, andlayersis treated as a Lottie animation rather than a JSON localization file..lottie: dotLottie zip archives. Every animation underanimations/(dotLottie 1.0) ora/(dotLottie 2.0) is translated.
Source file
Save this example asanimations/en-US/promo.json.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
.lottie file the same way:
Behavior and limitations
-
Only text layers (
ty: 5) are translated, including text layers inside precompositions (assets[].layers). Keys are JSON paths such aslayers[1].t.d.k[0].s.t. - Each text keyframe is one translation unit. The layer name, precomposition ID, and keyframe frame are supplied as translation context.
-
Lottie encodes line breaks as
\r. The translation keeps them as\r. - Writeback always starts from the source animation and replaces only the text string values. Formatting, number precision, and key order are preserved byte-for-byte.
- Text converted to shapes cannot be translated. Only editable text layers are extracted.
-
Animations that embed glyphs (
chars) only render characters that have glyph outlines. Use a font that covers the target script, or export without embedded glyphs. -
In
.lottiearchives, keys are prefixed with the animation entry, such asa/promo.json#layers[1].t.d.k[0].s.t. The target archive is rebuilt from the source archive. Only animations with translated text are rewritten; the manifest, images, themes, and state machines are copied unchanged. - Theme or slot overrides inside dotLottie archives are not translated.
- Translated text can overflow the original text box or layout. Review the rendered animation for each locale.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

