@nospamproxy/core
    Preparing search index...

    Value converter for multi language strings like "Hello world|[de-de]Hallo Welt" that returns the value for the current locale.

    The behavior of this value converter and it's exposed API should be the same as the NCCs DualLanguageValidationViewModel except that this implementation doesn't support null inputs.

    Index

    Constructors

    Methods

    • Parameters

      • input: string | null | undefined

      Returns string

    • Gracefully convert an input string to the specified locale.

      Parameters

      • input: string
      • locale: string

      Returns string

    • Normalize a regular or multi language string.

      Parameters

      • input: string

      Returns string

      The normalized string.

    • Try parsing a multi language string.

      Parameters

      • input: string

        The multi language or regular string.

      Returns [en: string, de: string | null] | null

      • A pair of english and german texts if input is a multi language string.
      • A pair of text and null if input is a regular string.
      • null if input contains incorrect syntax.
    • Check if input is a regular string or a valid multi language string.

      Parameters

      • input: string

      Returns boolean

      False, if input is a multi language string with incorrect syntax.