Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "l10n"

Index

Functions

getLocale

  • getLocale(): String
  • Returns the user's locale

    since

    15.0.0

    Returns String

translate

  • translate(app: String, text: String, vars?: Object, count?: Number, options?: OC.L10N.TranslationOptions): String
  • Translate a string

    since

    15.0.0

    Parameters

    • app: String

      the id of the app for which to translate the string

    • text: String

      the string to translate

    • Optional vars: Object

      map of placeholder key to value

    • Optional count: Number
    • Optional options: OC.L10N.TranslationOptions

    Returns String

translatePlural

  • translatePlural(app: String, textSingular: String, textPlural: String, count: Number, vars?: Object, options?: OC.L10N.TranslationOptions): String
  • Translate a plural string

    since

    15.0.0

    Parameters

    • app: String

      the id of the app for which to translate the string

    • textSingular: String

      the string to translate for exactly one object

    • textPlural: String

      the string to translate for n objects

    • count: Number

      number to determine whether to use singular or plural

    • Optional vars: Object

      of placeholder key to value

    • Optional options: OC.L10N.TranslationOptions

      options object

    Returns String

Generated using TypeDoc