Options
All
  • Public
  • Public/Protected
  • All
Menu

dotup-ts-internationalization

Index

Type aliases

GenderedTranslationItem

GenderedTranslationItem: PartialNested<GenderGroups, TranslationItem>

LanguageDictionary

LanguageDictionary: PartialNested<LanguageEnum, TranslationDictionary<TTextKeys>>

PartialLanguageDictionary

PartialLanguageDictionary: PartialNested<LanguageEnum, PartialTranslationDictionary<TTextKeys>>

PartialTranslationDictionary

PartialTranslationDictionary: PartialNested<TTextKeys, TranslationItem | PluralizedTranslationItem | GenderedTranslationItem>

PluralizedString

PluralizedString: PartialNested<PluralCategory, GenderedTranslationItem | TranslationItem>

PluralizedTranslationItem

PluralizedTranslationItem: PartialNested<PluralGroups, PluralizedString>

TranslationDictionary

TranslationDictionary: Nested<TTextKeys, TranslationItem | PluralizedTranslationItem | GenderedTranslationItem>

TranslationItem

TranslationItem: string | string[]

Variables

Const areIntlLocalesSupported

areIntlLocalesSupported: any = require('intl-locales-supported')

Const regex_replace_number

regex_replace_number: RegExp = /#/gm

Const result

result: string = t.format({key: TextKeys.PluralizedWithGender,gender: GenderGroups.male,plural: {group: PluralGroups.plural,value: 1}})

Const t

t: Translator<TextKeys> = tlib.getTranslator(LanguageEnum.deDE)

Const tlib

tlib: TextLibrary<TextKeys> = new TextLibrary<TextKeys>(translations)

Functions

InitializeIntl

Object literals

Const newT

newT: object

de-DE

de-DE: object

DirectText

DirectText: string = "DirectText"

Hello

Hello: string[] = ['Hallo', 'Hi', 'Servus']

NamedPlaceHolderText

NamedPlaceHolderText: string = "Text two with {MyVariable}"

PlaceHolderText

PlaceHolderText: string = "Text with {0}"

Slang

Slang: string[] = ['nasen', 'eumel', 'vögel']

TextArray

TextArray: string[] = ['TextArray1', 'TextArray1']

WithTextLink

WithTextLink: string[] = ['$(DirectText) with $(Slang)']

Gendered

Gendered: object

female

female: string = "is female"

male

male: string = "is male"

Pluralized

Pluralized: object

plural

plural: object

few

few: string = "few"

many

many: string = "many"

one

one: string = "one"

other

other: string = "other"

two

two: string = "two"

zero

zero: string = "zero"

PluralizedWithGender

PluralizedWithGender: object

ordinal

ordinal: object

one

one: string[] = ['erstes $(Hello)']

other

other: string = "zweites $(Hello)"

plural

plural: object

many

many: string = ""

other

other: string = "plural-other $(DirectText)"

few

few: object

female

female: string[] = ['']

male

male: string = "beim man #"

one

one: object

female

female: string[] = ['plural-one-female # $(DirectText)']

male

male: string = "plural-one-male $(DirectText)"

Const tr

tr: object

DirectText

DirectText: string = "DirectText"

Hello

Hello: string[] = ['Hallo', 'Hi', 'Servus']

NamedPlaceHolderText

NamedPlaceHolderText: string = "Text two with {MyVariable}"

PlaceHolderText

PlaceHolderText: string = "Text with {0}"

Slang

Slang: string[] = ['nasen', 'eumel', 'vögel']

TextArray

TextArray: string[] = ['TextArray1', 'TextArray1']

WithTextLink

WithTextLink: string[] = ['$(DirectText) with $(Slang)']

Gendered

Gendered: object

female

female: string = "is female"

male

male: string = "is male"

Pluralized

Pluralized: object

plural

plural: object

few

few: string = "few"

many

many: string = "many"

one

one: string = "one"

other

other: string = "other"

two

two: string = "two"

zero

zero: string = "zero"

PluralizedWithGender

PluralizedWithGender: object

ordinal

ordinal: object

one

one: string[] = ['erstes $(Hello)']

other

other: string = "zweites $(Hello)"

plural

plural: object

many

many: string = ""

other

other: string = "plural-other $(DirectText)"

few

few: object

female

female: string[] = ['']

male

male: string = "beim man #"

one

one: object

female

female: string[] = ['plural-one-female # $(DirectText)']

male

male: string = "plural-one-male $(DirectText)"

Const translations

translations: object

de-DE

de-DE: object

DirectText

DirectText: string = "DirectText"

Hello

Hello: string[] = ['Hallo', 'Hi', 'Servus']

NamedPlaceHolderText

NamedPlaceHolderText: string = "Text two with {MyVariable}"

PlaceHolderText

PlaceHolderText: string = "Text with {0}"

Slang

Slang: string[] = ['nasen', 'eumel', 'vögel']

TextArray

TextArray: string[] = ['TextArray1', 'TextArray1']

WithTextLink

WithTextLink: string[] = ['$(DirectText) with $(Slang)']

Gendered

Gendered: object

female

female: string = "is female"

male

male: string = "is male"

Pluralized

Pluralized: object

plural

plural: object

few

few: string = "few"

many

many: string = "many"

one

one: string = "one"

other

other: string = "other"

two

two: string = "two"

zero

zero: string = "zero"

PluralizedWithGender

PluralizedWithGender: object

ordinal

ordinal: object

one

one: string[] = ['erstes $(Hello)']

other

other: string = "zweites $(Hello)"

plural

plural: object

many

many: string = ""

other

other: string = "plural-other $(DirectText)"

few

few: object

female

female: string[] = ['']

male

male: string = "beim man #"

one

one: object

female

female: string[] = ['plural-one-female # $(DirectText)']

male

male: string = "plural-one-male # $(DirectText)"

Const utility

utility: object

escapeQuotes

  • escapeQuotes(s: string): string
  • Parameters

    • s: string

    Returns string

unescapeQuotes

  • unescapeQuotes(s: string): string
  • Parameters

    • s: string

    Returns string

Generated using TypeDoc