Create a Zod schema that transforms a string into a multilingual text object. Validates the language code and escapes HTML in the value.

  • Parameters

    • language: string

      Language code for the text

    Returns ZodPipe<ZodString, ZodTransform<Record<string, string>, string>>

    Zod schema producing a MultilingualString