Wagtail client-side components
    Preparing search index...

    Localizes elements in the current locale.

    <select data-controller="w-locale" data-action="w-locale#localizeTimeZoneOptions">
    <option value="" selected>Use server time zone</option>
    <option value="Asia/Jakarta">Asia/Jakarta</option>
    <option value="Asia/Tokyo">Asia/Tokyo</option>
    </select>

    Hierarchy

    Index

    Constructors

    • Parameters

      • context: Context

      Returns LocaleController

    Properties

    context: Context
    blessings: (<T>(constructor: Constructor<T>) => any)[]
    outlets: string[]
    targets: string[]
    values: ValueDefinitionMap

    Accessors

    • get application(): Application

      Returns Application

    • get classes(): ClassMap

      Returns ClassMap

    • get data(): DataMap

      Returns DataMap

    • get element(): ElementType

      Returns ElementType

    • get identifier(): string

      Returns string

    • get outlets(): OutletSet

      Returns OutletSet

    • get scope(): Scope

      Returns Scope

    • get targets(): TargetSet

      Returns TargetSet

    • get shouldLoad(): boolean

      Returns boolean

    Methods

    • Returns void

    • Returns void

    • Parameters

      • eventName: string
      • Optional__namedParameters: Partial<
            {
                bubbles: boolean;
                cancelable: boolean;
                detail: Object;
                prefix: string;
                target: Element
                | Window
                | Document;
            },
        >

      Returns CustomEvent<Object>

    • Returns void

    • Localize the time zone <options> of a <select> element in the current locale.

      Parameters

      • Optionalevent: Event & { params?: { serverTimeZone?: string } }

      Returns void

    • Parameters

      • _identifier: string
      • _application: Application

      Returns void

    • Parameters

      • timeZone: string

        An IANA time zone string

      Returns string

      formatted time zone name in the current locale with short and long labels, e.g. "GMT+7 (Western Indonesia Time)"

    • Localize an IANA time zone in the current locale.

      Parameters

      • timeZone: string

        An IANA time zone string

      • format:
            | undefined
            | "short"
            | "long"
            | "shortOffset"
            | "longOffset"
            | "shortGeneric"
            | "longGeneric"

        Time zone name formatting option

      Returns string

      formatted time zone name in the current locale