@metreeca/qest - v0.10.0
    Preparing search index...

    Type Alias Locales

    Locales:
        | { readonly [range: string]: string }
        | { readonly [range: string]: readonly [string] }

    Localised text map template.

    Retrieves a localised property as a single structured Dictionary value: the localised counterpart of a nested Template, not a multi-valued or collection property. The tag range keys are RFC 4647 basic language ranges (a subtag sequence or the standalone *) and select which locales populate that structured value; each range filters the available language tags by basic filtering, and a range may expand to several tag entries in the retrieved map (the standalone * matches every tag, and a range such as en matches en along with more specific tags like en-US).

    The umbrella union admits two value-shape forms that fix the per-tag cardinality of the retrieved entries, not the property's own cardinality:

    • a single-string value per tag range, retrieving one string per matched tag, or
    • a singleton-array value per tag range, retrieving an array of strings per matched tag

    The value position is an inert placeholder ("" or [""]): it carries no data and only selects the per-tag cardinality, leaving the TagRange keys alone to drive locale selection.

    Locales is one of the Model single-value forms, reaching Placeholders through the single-value arm alongside Placeholder and Union rather than under Query, reflecting that a localised property is one structured value and not a collection. Its TagRange keys select retrieved content only and are independent of Selection: a Locales map carries tag ranges, never Selection operator keys. Resource matching by a localised property is done separately, at the enclosing collection's Selection via ?/!.

    Note

    • If the query specifies a single- or multi-valued form, the retrieved Dictionary entry should use the corresponding form
    • The @none key for non-localised values is not supported; use the und tag for language-neutral values
    Note

    An empty tag-range map ({}), whether it appears directly as a field value or as a collection tuple's element, carries no locale constraints and must be ignored by processors as if the owning field were omitted from the enclosing template.