Hello. I just replicated your project’s multilingual part in SquareLine Studio 1.3.4. The ‘_’ prefix is correctly put before the ‘Sonnenauf-/Uuntergang:’ string in the code exported by SquareLine Studio. (If you want your default label to be translated too, set it ‘to be translated’ within the label’s text field too.) If the i18n works for your other widgets it should work for the label set by the slider event as well. Maybe you need to use your c./.h files generated by lv_i18n differently for text set by events than with static texts… @Zebra: There’s a description here:
lv_i18n needs node.js and the steps are explained.
I’m working in windows 10, and i tried to put the steps but it’s not working,
i tried by creating a project for eclipse simulator on SLS, containing simple widgets
i installed lv_i18n locally
npm init private
npm i lv_i18n -s
# now available at ./node_modules/.bin/lv_i18n
i created 2 yml files named fr.yml and en-GB.yml, in a folder i named translations located in root where i added fr: ~en-gb: ~
## here i try to extract texts to fill yaml files, it not working
C:\Users\$$$$$\test_ui_i18N\testUi_i18N>lv_i18n extract -s 'ui\ui_Screen1.c' -t 'translations\fr.yml'
Failed to find any source file
## i filled yml file manually and by compiling it, it can't find translation file
C:\Users\$$$$$\test_ui_i18N\testUi_i18N>lv_i18n compile -t 'translations\*.yml' -o 'src\lv_i18n'
Failed to find any translation file.
(i use '' instead of ‘/’ because i’m working on windows
I don’t know exactly where lv_i18n should be placed, should i clone lv_i18n from github respirory ?
i don’t have knowings in Node.JS, is lv_i18n working only on linux ?
I haven’t tried on Windows yet but maybe it’s related to commandline differences and environment variables (path-settings), the usual problems, when I try commandline toolchains on Windows. As SquareLine exports as expected, it’s essentially an LVGL-related question and I see you posted there too (How to use lv_i18n (multilanguage) - How-to - LVGL Forum). Hope to see a solution soon.
(If all else fails you can still create your translations directly in lv_i18n.c (or included separate .c language files), I did it for a small project, without any yml files. The node.js script however makes collecting i18n texts between _() from your sources for big projects easier. I think it could be done without node.js, a short program written in python/C would likely be more obvious choice and more convenient to use.)