API reference / @localizer/core / localizeObject
Function: localizeObject()
localizeObject<
T
>(values
,locale
):Localized
<T
>
Defined in: fn/localizable/localizeObject.ts:34
Localizes an object's properties by converting Localizable
values to their localized forms.
Type Parameters
Type Parameter | Description |
---|---|
T extends Record <string , unknown > | The input object type with properties that may be Localizable . |
Parameters
Parameter | Type | Description |
---|---|---|
values | T | The object with properties to localize. |
locale | null | LocaleCode | The locale code for localization, or null for a default. |
Returns
Localized
<T
>
A new object with Localizable
properties replaced by localized values.