# Defold Druid UI Library

# Module `LangText`

Component to handle all GUI texts Good working with localization system

## Functions

format(self[, a[, b[, c[, d[, e[, f[, g]]]]]]]) | Format string with new text params on localized text
init(self, node, locale_id, no_adjust) | Component init function
set_to(self, text) | Setup raw text to lang_text component
translate(self, locale_id[, a[, b[, c[, d[, e[, f[, g]]]]]]]) | Translate the text by locale_id

## Fields

on_change | On change text callback
text | The text component

## Functions

format(self[, a[, b[, c[, d[, e[, f[, g]]]]]]])
  Format string with new text params on localized text

  ### Parameters:

  - self LangText LangText
  - a string Optional param to string.format (optional)
  - b string Optional param to string.format (optional)
  - c string Optional param to string.format (optional)
  - d string Optional param to string.format (optional)
  - e string Optional param to string.format (optional)
  - f string Optional param to string.format (optional)
  - g string Optional param to string.format (optional)

  ### Returns:

  LangText Current instance
init(self, node, locale_id, no_adjust)
  Component init function

  ### Parameters:

  - self LangText LangText
  - node node The text node
  - locale_id string Default locale id or text from node as default
  - no_adjust bool If true, will not correct text size
set_to(self, text)
  Setup raw text to lang_text component

  ### Parameters:

  - self LangText LangText
  - text string Text for text node

  ### Returns:

  LangText Current instance
translate(self, locale_id[, a[, b[, c[, d[, e[, f[, g]]]]]]])
  Translate the text by locale_id

  ### Parameters:

  - self LangText LangText
  - locale_id string Locale id
  - a string Optional param to string.format (optional)
  - b string Optional param to string.format (optional)
  - c string Optional param to string.format (optional)
  - d string Optional param to string.format (optional)
  - e string Optional param to string.format (optional)
  - f string Optional param to string.format (optional)
  - g string Optional param to string.format (optional)

  ### Returns:

  LangText Current instance

## Fields

on_change
  On change text callback
  - on_change DruidEvent DruidEvent
text
  The text component
  - text Text Text

generated by LDoc TESTING Last updated 2015-01-01 12:00:00