localize-comp
Create a localized duplicate of an After Effects composition by replacing specified text layers with translated strings, preserving all animations, effects, and precomposition structures. Supports Arabic/RTL auto-detection.
Instructions
Create a localized duplicate of a composition: swap in translated text for one or more text layers, auto-detecting Arabic and applying right-to-left direction/alignment (same logic as create-text-layer). Every other layer, effect, and animation is preserved unchanged because the whole composition is duplicated first. Text layers nested inside precompositions are reachable too via path: every precomposition on the path is safely duplicated the first time it's encountered (and reused if referenced again from another path), so the original precomps are never modified. Translation itself is the caller's job; pass the already-translated strings in translations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compName | No | Source composition name (or the active comp if omitted). | |
| compIndex | No | 1-based index among compositions, if compName is omitted. | |
| newCompName | No | Name for the new localized composition (default: '<source name> (localized)'). | |
| translations | Yes | One entry per text layer to localize, each targeting a layer by layerIndex/layerName (top level) or by path (nested inside precompositions). |