iya-sts
    Preparing search index...

    Variable translatorFor

    translatorFor: (acceptLanguage: unknown, route?: string) => ProseTranslator = ...

    Type Declaration

      • (acceptLanguage: unknown, route?: string): ProseTranslator
      • Builds a translator for an Accept-Language value, or answers null when there is nothing to translate into: no header, or one only English answers.

        Parameters

        • acceptLanguage: unknown

          the header's value, or undefined

        • Optionalroute: string

          the route the answer is to (res.locals.proseRoute), which a phrase source is scoped by

        Returns ProseTranslator

        the translator, or null