Options
All
  • Public
  • Public/Protected
  • All
Menu

Module translation

Index

Type aliases

TranslationBundle

TranslationBundle: { __: any; _n: any; _np: any; _p: any; dcnpgettext: any; gettext: any; ngettext: any; npgettext: any; pgettext: any }

Type declaration

  • __: function
    • __(msgid: string, ...args: any[]): string
    • Parameters

      • msgid: string
      • Rest ...args: any[]

      Returns string

  • _n: function
    • _n(msgid: string, msgid_plural: string, n: number, ...args: any[]): string
    • Parameters

      • msgid: string
      • msgid_plural: string
      • n: number
      • Rest ...args: any[]

      Returns string

  • _np: function
    • _np(msgctxt: string, msgid: string, msgid_plural: string, n: number, ...args: any[]): string
    • Parameters

      • msgctxt: string
      • msgid: string
      • msgid_plural: string
      • n: number
      • Rest ...args: any[]

      Returns string

  • _p: function
    • _p(msgctxt: string, msgid: string, ...args: any[]): string
    • Parameters

      • msgctxt: string
      • msgid: string
      • Rest ...args: any[]

      Returns string

  • dcnpgettext: function
    • dcnpgettext(domain: string, msgctxt: string, msgid: string, msgid_plural: string, n: number, ...args: any[]): string
    • Parameters

      • domain: string
      • msgctxt: string
      • msgid: string
      • msgid_plural: string
      • n: number
      • Rest ...args: any[]

      Returns string

  • gettext: function
    • gettext(msgid: string, ...args: any[]): string
    • Parameters

      • msgid: string
      • Rest ...args: any[]

      Returns string

  • ngettext: function
    • ngettext(msgid: string, msgid_plural: string, n: number, ...args: any[]): string
    • Parameters

      • msgid: string
      • msgid_plural: string
      • n: number
      • Rest ...args: any[]

      Returns string

  • npgettext: function
    • npgettext(msgctxt: string, msgid: string, msgid_plural: string, n: number, ...args: any[]): string
    • Parameters

      • msgctxt: string
      • msgid: string
      • msgid_plural: string
      • n: number
      • Rest ...args: any[]

      Returns string

  • pgettext: function
    • pgettext(msgctxt: string, msgid: string, ...args: any[]): string
    • Parameters

      • msgctxt: string
      • msgid: string
      • Rest ...args: any[]

      Returns string

Variables

ITranslator

ITranslator: Token<ITranslator>

ITranslatorConnector

ITranslatorConnector: Token<ITranslatorConnector>

Const nullTranslator

nullTranslator: NullTranslator

The application null translator instance that just returns the same text. Also provides interpolation.

Functions

requestTranslationsAPI

  • requestTranslationsAPI<T>(translationsUrl?: string, locale?: string, init?: RequestInit): Promise<T>
  • Call the API extension

    Type parameters

    • T

    Parameters

    • Optional translationsUrl: string
    • Optional locale: string

      API REST end point for the extension

    • Optional init: RequestInit

      Initial values for the request

    Returns Promise<T>

    The response body interpreted as JSON

Generated using TypeDoc