Important: posts that do not use this template will be ignored or closed.
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
- Be sure you have checked the relevant part of the documentation. We will not respond in detail to posts where you haven’t read the relevant documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
I need an example of language translation. I have done fallowing example from https://github.com/lvgl/lv_i18n but it did not work on simulator.
What MCU/Processor/Board and compiler are you using?
What do you want to achieve?
I have created .c and .h files using ```c lv_i18n compile -t ‘translations/*.yml’ -o 'lv_i18n ``
What have you tried so far?
https://github.com/lvgl/lv_i18n#mark-up-the-text-in-your-code added to my file but getting errors for lv_i18n_language_pack.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/ /*this code is inside main block*/ /* en-GB.yml file en-GB: title1: Main menu pedal_warning: Please plug pedal user_logged_in: one: One user is logged in other: '%d users are logged in' */ lv_obj_t * scr = lv_disp_get_scr_act(NULL); /*Get the current screen*/ // /*Create a Label on the currently active screen*/ lv_i18n_init(lv_i18n_language_pack); lv_i18n_set_locale("en-GB"); lv_obj_t * label = lv_label_create(scr, NULL); lv_label_set_text(label, _("title1"))
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.