Chartbreaker
    Preparing search index...

    Translator translator instance used to translate strings based on the stored gettext information

    Index

    Constructors

    Methods

    • set the context for the following translation operations

      Parameters

      • ctx: string | null

        Use empty string or null to clear

      Returns void

    • set the domain for the following translation operations

      Parameters

      • domain: string | null

        Use empty string or null to clear

      Returns void

    • store a gettext object used for all translations

      Parameters

      • o: unknown

      Returns void

    • translate the provided key

      Parameters

      • key: string | I18NString<(string | number)[]>
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided key in a domain

      Parameters

      • domain: string
      • key: string | I18NString<(string | number)[]>
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided singular and plural keys in a domain

      Parameters

      • domain: string
      • singular: string
      • plural: string
      • val: string
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided singular and plural keys in a domain in context

      Parameters

      • domain: string
      • ctx: string
      • singular: string
      • plural: string
      • val: string
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided key in a domain in context

      Parameters

      • domain: string
      • ctx: string
      • key: string | I18NString<(string | number)[]>
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided singular and plural keys

      Parameters

      • singular: string
      • plural: string
      • Optionalval: number
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided singular and plural keys in a context

      Parameters

      • ctx: string
      • singular: string
      • plural: string
      • val: string
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string

    • translate the provided key in context

      Parameters

      • ctx: string
      • key: string | I18NString<(string | number)[]>
      • ...var_args: (string | number)[]

        args for sprintf

      Returns string