# Class `luci.i18n`

## Functions

dump () | Return all currently loaded translation strings as a key-value table.
setlanguage (lang) | Set the context default translation language.
translate (key) | Return the translated value for a specific translation key.
translatef (key, ...) | Return the translated value for a specific translation key and use it as sprintf pattern.

## Functions

dump ()
  Return all currently loaded translation strings as a key-value table. The key is the hexadecimal representation of the translation key while the value is the translated text content.

  ### Return value:

  Key-value translation string table.
setlanguage (lang)
  Set the context default translation language.

  ### Parameters

  - lang: An IETF/BCP 47 language tag or ISO3166 country code, e.g. "en-US" or "de"

  ### Return value:

  The effective loaded language, e.g. "en" for "en-US" - or nil on failure
translate (key)
  Return the translated value for a specific translation key.

  ### Parameters

  - key: Default translation text

  ### Return value:

  Translated string
translatef (key, ...)
  Return the translated value for a specific translation key and use it as sprintf pattern.

  ### Parameters

  - key: Default translation text
  - ...: Format parameters

  ### Return value:

  Translated and formatted string