Riksdagsmonitor Intelligence Platform - v0.7.19
    Preparing search index...
    • Emit a Swedish-language span.

      The span always carries both the lang="sv" accessibility attribute AND data-translate="true" so that translateSwedishContent() (in translation-dictionary.ts) can locate every Swedish phrase, look it up in the per-language dictionary, and replace or clean the marker before the article is written to disk.

      • SV articles: the marker lets validation tooling verify original text is present; translateSwedishContent() strips the marker but keeps the Swedish text unchanged.
      • Non-SV articles: translateSwedishContent() attempts dictionary translation via translatePhrase() and removes the marker regardless of whether a match was found, so no data-translate attributes remain in the final HTML.

      Parameters

      • escapedText: string

        Already HTML-escaped text content

      • _lang: string

        Target article language (kept only for backward compatibility; currently not used by this function)

      Returns string