Home > @uniformdev/canvas > localize

localize() function

Localizes a composition or entry that may contain: * Structural localization with localization components (locale specific layout) * Property localization with localizable property values (translations)

The result will contain only parameters and localizations that match one of the input locales. Information for other locales will be discarded in the result.

NOTE: this function mutates its input object for maximum performance. If you desire immutability wrap it in immer.

NOTE: this function is only necessary when content has been fetched in more than one locale from the Uniform API. If a locale was provided to the Uniform API, the content will already be localized in the desired locale.

Signature:

Parameters

ParameterTypeDescription
optionsLocalizeModernOptions

Returns:

void