diff --git a/lv_core/lv_lang.c b/lv_core/lv_lang.c index 715bb3a91..bb1336459 100644 --- a/lv_core/lv_lang.c +++ b/lv_core/lv_lang.c @@ -75,7 +75,7 @@ void lv_lang_set_text_func(const void * (*fp)(uint16_t)) * @param txt_id an ID of the text to get * @return the `txt_id` txt on the set language */ -void * lv_lang_get_text(uint16_t txt_id) +const void * lv_lang_get_text(uint16_t txt_id) { if(get_txt == NULL) { LV_LOG_WARN("lv_lang_get_text: text_func is not specified"); diff --git a/lv_core/lv_lang.h b/lv_core/lv_lang.h index 1d953ef56..003b198de 100644 --- a/lv_core/lv_lang.h +++ b/lv_core/lv_lang.h @@ -51,7 +51,7 @@ void lv_lang_set_text_func(const void * (*fp)(uint16_t)); * @param txt_id an ID of the text to get * @return the `txt_id` txt on the set language */ -void * lv_lang_get_text(uint16_t txt_id); +const void * lv_lang_get_text(uint16_t txt_id); /** * Return with ID of the currently selected language diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index b57522798..d4ef98f6e 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -761,7 +761,6 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param } else if(sign == LV_SIGNAL_LANG_CHG) { #if USE_LV_MULTI_LANG if(ext->lang_txt_id != LV_LANG_TXT_ID_NONE) { - uint8_t lang = lv_lang_act(); const char * lang_txt = lv_lang_get_text(ext->lang_txt_id); if(lang_txt) { lv_label_set_text(label, lang_txt);