Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TranslationsProvider

Hierarchy

Index

Constructors

constructor

  • Parameters

    • language: string

    Returns TranslationsProvider

Properties

Readonly contextRules

contextRules: IContextRules

Readonly dictionaries

dictionaries: Map<string, Map<string, string[]>> = new Map<string, Map<string, string[]>>()

Readonly language

language: string

Methods

getTranslation

  • getTranslation(dictionaryName: string, entry: string): undefined | string[]
  • Parameters

    • dictionaryName: string
    • entry: string

    Returns undefined | string[]

setArticleRules

  • setArticleRules(...rules: Array<NameRule | []>): this
  • Parameters

    Returns this

setContextRules

  • setContextRules(rules: {}): this
  • Parameters

    • rules: {}

    Returns this

setDictionary

  • setDictionary(dictionary: string, translations: Record<string, string | string[]>): this
  • Parameters

    • dictionary: string
    • translations: Record<string, string | string[]>

    Returns this

setIrregularRules

  • setIrregularRules(...rules: Array<[]>): this
  • Parameters

    • Rest ...rules: Array<[]>

    Returns this

setPluralizationRules

  • setPluralizationRules(...rules: Array<PluralRule | []>): this
  • Parameters

    Returns this

setSingularizationRules

  • setSingularizationRules(...rules: Array<SingularRule | []>): this
  • Parameters

    Returns this

setUncountableRules

  • setUncountableRules(...rules: Array<RegExp | string>): this
  • Parameters

    • Rest ...rules: Array<RegExp | string>

    Returns this

Object literals

Readonly pluralizationRules

pluralizationRules: object

articleRules

articleRules: never[] = []

irregularRules

irregularRules: never[] = []

pluralRules

pluralRules: never[] = []

singularRules

singularRules: never[] = []

uncountables

uncountables: never[] = []

Generated using TypeDoc