Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/methods/__n"

Index

Variables

Functions

Variables

Const pluralsInstanceForLocale

pluralsInstanceForLocale: Record<string, MakePlural>

Functions

__n

  • __n(params: I18nPluralParams, count?: string | number, ...values: any[]): string
  • __n(singularOrStrings: string | TemplateStringsArray, count: string | number, ...values: any[]): string
  • __n(singular: string, plural: string, count: string | number, ...values: any[]): string
  • Plurals translation of a single phrase. Singular and plural forms will get added to locales if unknown.

    Parameters

    • params: I18nPluralParams

      Translate params.

    • Optional count: string | number

      Target count.

    • Rest ...values: any[]

      Values to print.

    Returns string

    Translated parsed and substituted string based on count parameter.

  • Plurals translation of a single phrase. Singular and plural forms will get added to locales if unknown.

    Parameters

    • singularOrStrings: string | TemplateStringsArray

      Singular form to translate, or array of strings.

    • count: string | number

      Target count.

    • Rest ...values: any[]

      Values to print.

    Returns string

    Translated parsed and substituted string based on count parameter.

  • Plurals translation of a single phrase. Singular and plural forms will get added to locales if unknown.

    Parameters

    • singular: string

      Singular form to translate.

    • plural: string

      Plural form to translate.

    • count: string | number

      Target count.

    • Rest ...values: any[]

      Values to print.

    Returns string

    Translated parsed and substituted string based on count parameter.

Generated using TypeDoc