Options
All
  • Public
  • Public/Protected
  • All
Menu

Class I18n

Language transition class Export I18n APIs

Hierarchy

  • I18n

Index

Constructors

constructor

Properties

Private _dict

_dict: object

Type declaration

Private _lang

_lang: any = null

Private _options

_options: I18nOptions = null

Methods

get

  • get(key: any, defVal?: any): any
  • method

    Get value

    Parameters

    • key: any
    • Default value defVal: any = undefined

      Default value

    Returns any

getByLanguage

  • getByLanguage(key: any, language: any, defVal?: any): any
  • method

    Get value according to specified language

    Parameters

    • key: any
    • language: any

      Specified langurage to be used

    • Default value defVal: any = null

      Default value

    Returns any

putVocabularies

  • putVocabularies(vocabularies: any): void
  • method

    Add vocabularies for one language

    Parameters

    • vocabularies: any

      Object that has language as key, vocabularies of each language as value

    Returns void

putVocabulariesForLanguage

  • putVocabulariesForLanguage(language: any, vocabularies: any): void
  • method

    Add vocabularies for one language

    Parameters

    • language: any
    • vocabularies: any

      Object that has key-value as dictionary entry

    Returns void

setLanguage

  • setLanguage(lang: string): void

Static checkConfig

  • checkConfig(): boolean

Static configure

  • configure(config: any): any
  • static
    method

    Configure I18n part

    Parameters

    • config: any

      Configuration of the I18n

    Returns any

Static createInstance

  • createInstance(): void

Static get

  • get(key: any, defVal: any): any

Static getModuleName

  • getModuleName(): string

Static putVocabularies

  • putVocabularies(vocabularies: any): any
  • static
    method

    Add vocabularies for one language

    Parameters

    • vocabularies: any

      Object that has language as key, vocabularies of each language as value

    Returns any

Static putVocabulariesForLanguage

  • putVocabulariesForLanguage(language: any, vocabularies: any): any
  • static
    method

    Add vocabularies for one language

    Parameters

    • language: any
    • vocabularies: any

      Object that has key-value as dictionary entry

    Returns any

Static setLanguage

  • setLanguage(lang: any): any