Interface PageControlPropertyLocalizer

Handle the localization of control properties for a given property type.

interface PageControlPropertyLocalizer {
    createResources: ((propertyKey: string, control: Control<TypeAttributes>) => Record<string, string>);
    localizeControlAttribute: ((propertyKey: string, control: Control<TypeAttributes>, resources: Record<string, string>) => void);
    localizerType: "page";
    propertyType: string;
}

Hierarchy (view full)

Properties

createResources: ((propertyKey: string, control: Control<TypeAttributes>) => Record<string, string>)

Generate resources to be included when the page control is saved. Page control resources are stored on the page template metadata and so resource keys should be made to be unique per control.

Type declaration

    • (propertyKey, control): Record<string, string>
    • Parameters

      Returns Record<string, string>

      the resource keys and values for the given control property

localizeControlAttribute: ((propertyKey: string, control: Control<TypeAttributes>, resources: Record<string, string>) => void)

Use generated resource keys & values to localize the given control property.

Type declaration

    • (propertyKey, control, resources): void
    • Parameters

      • propertyKey: string

        the control attribute to be localized

      • control: Control<TypeAttributes>

        the page control

      • resources: Record<string, string>

        page template resources

      Returns void

localizerType

Control type to be localized,

propertyType: string

Property type to be localized. (the type that the property editor is registered against)