Module druid.lang_text
Component to handle all GUI texts Good working with localization system
Functions
init(node, locale_id, no_adjust) | Component init function |
set_to(text) | Setup raw text to lang_text component |
translate(locale_id) | Translate the text by locale_id |
Tables
Events | Component events |
Fields | Component fields |
Functions
- init(node, locale_id, no_adjust)
-
Component init function
Parameters:
- node node The text node
- locale_id string Default locale id
- no_adjust bool If true, will not correct text size
- set_to(text)
-
Setup raw text to lang_text component
Parameters:
- text string Text for text node
- translate(locale_id)
-
Translate the text by locale_id
Parameters:
- locale_id string Locale id