EU Parliament Monitor — API Documentation - v0.9.28
    Preparing search index...
    • Compose a content-differentiated <title> for a non-Latin locale that would otherwise fall back to the date-suffixed template title.

      Two same-date / same-articleType runs whose English brief differs but whose localized template title is identical (e.g. two 2026-04-13 motions re-runs) collide on the SERP. Run-number / "Edition N" disambiguators are forbidden in titles, so the differentiator must be content-based: we reuse the localized template's leading locale-script clause as the prefix and splice in a short distinctive English topic fragment derived from the run's own English headline / summary. The resulting mixed-script title still carries a locale glyph (Gate 4a) and mirrors the existing "<localized label>: Main Committees" precedent.

      Returns '' (caller keeps the date-suffixed fallback) whenever the locale is Latin, the base label lacks a locale glyph, the per-script title budget leaves no room for a meaningful fragment, or no candidate yields a clean, leak-free, budget-fitting fragment.

      Parameters

      • args: {
            lang: LanguageCode;
            templateTitle: string;
            englishCandidates: readonly string[];
        }

        Composition inputs

        • Readonlylang: LanguageCode

          Publishing locale

        • ReadonlytemplateTitle: string

          Localized template title (prefix source)

        • ReadonlyenglishCandidates: readonly string[]

          Raw English editorial texts (priority order)

      Returns string

      A distinctive mixed-script title, or '' when none can be built