lv_translation.h

API reference for lv_translation.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_translation_private.h

Functions

lv_translation_set_language

Select the current language The LV_EVENT_TRANSLATION_LANGUAGE_CHANGED event will be sent to every widget

 
void lv_translation_set_language(const char *lang)
Parameters
NameTypeDescription
langconst char *a string from the defined languages. E.g. "en" or "de"

lv_translation_set_tag_translation

Add a translation to a tag in a dynamic translation pack

 
lv_result_t lv_translation_set_tag_translation(lv_translation_pack_t *pack, lv_translation_tag_dsc_t *tag, uint32_t lang_idx, const char *trans)
Parameters
NameTypeDescription
packlv_translation_pack_t *pointer to a dynamic translation pack
taglv_translation_tag_dsc_t *return value of lv_translation_add_tag
lang_idxuint32_tindex of the language for which translation should be set
transconst char *the translation on the given language

Returns: lv_result_t — LV_RESULT_OK: success, LV_RESULT_INVALID: failed

Dependencies

Indirect dependencies

How is this guide?

Last updated on

On this page