Romain BECAN / Mbed 2 deprecated Mallette_RB10G1_V40

Dependencies:   TS_DISCO_F746NG mbed LCD_DISCO_F746NG BSP_DISCO_F746NG lvgl_RB FastPWM millis

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AIDE.h Source File

AIDE.h

00001     
00002  //Multilangue   
00003     //lvgl has lv_i18n module for internationalization: https://github.com/littlevgl/lv_i18n
00004     // - It's a script which automatically extracts the strings to translate from you code
00005     // - However to run the script you need the code offline
00006     // - An other option is to  manually create the internationalization file
00007     // - I've added lv_i18n.c/h as a reference
00008     // - You can test it like this    
00009     //         lv_i18n_init(lv_i18n_language_pack);
00010     //         lv_i18n_set_locale("en-GB");
00011     //         printf(_("dog"));
00012     //         printf("\n");
00013     //
00014     //         lv_i18n_set_locale("fr");
00015     //         printf(_("dog"));
00016     //         printf("\n");
00017     //
00018     // - '_' is a function which get the translated version of "dog" and "cat" in the given local
00019     // - You can use it with labels: lv_label_set_text(label, _("dog"))
00020     // - Translation with prinf-like format characters are also possible. E.g.
00021     // - In lv_i18n.c: {"user_count", "There are %d users"},
00022     // - Usage: 
00023     //         char buf[128];
00024     //         sprintf(buf, _("user_count"), 55);
00025     //
00026     // - Or: 
00027     //         lv_label_set_text_fmt(label, _("user_count"), 55);