Home > @uniformdev/mesh-sdk > EditorStateApi > setPropertyLocalizability
EditorStateApi.setPropertyLocalizability() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Warning: This API is now obsolete.
Beta. Subject to change without notice; do not rely on this API in production integrations.
Toggles a parameter between "shared" (single invariant value) and "localized" (per-locale values) — the same operation as the dashboard "Use locale-specific values" switch on the parameter's locale drawer.
isLocalized: truecopies the current invariant value (and its conditions) into each locale enabled on the composition. -isLocalized: falsecopies the value fromcopyFromLocale(or the first defined locale, if omitted) back into the invariant slot and drops the per-locale values.
The migration handles pattern parameter overrides, contentReference data resource forking, and the per-node localizability metadata, so the resulting state matches what the dashboard UI would produce for the same toggle. The whole migration is one editor mutation, which keeps it as a single undo step for the user.
The caller must supply propertyDefinition — the component-definition parameter for (nodeId, property). This is required so the bridge can enforce localizability business rules (e.g. refusing to localize a parameter whose definition forbids it) and resolve the parameter type for value fan-out. Resolve it from the Uniform public API using your service account API key (or, in the future, identity delegation) and cache it client-side as needed.
No-ops if the parameter is already in the requested state; if the parameter does not exist on the node; if (when localizing) no locales are enabled; or if (when localizing) the supplied propertyDefinition.localizable is false.
This is beta functionality. It is intentionally exposed as @deprecated so consumers do not depend on it from production integrations — the signature and behaviour may change without notice.
Signature:
Parameters
| Parameter | Type | Description |
|---|---|---|
| params | SetPropertyLocalizabilityParams |
Returns:
Promise<void>