mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Add dynamic translation selection to the usecases esp-idf build
This commit is contained in:
parent
154d877d9f
commit
37a82bcff5
7 changed files with 51 additions and 14 deletions
|
@ -76,6 +76,11 @@ void run()
|
|||
}));
|
||||
});
|
||||
|
||||
app->global<MainViewAdapter>().on_select_language([](int index) {
|
||||
static const char *langs[] = { "en", "de" };
|
||||
slint::select_bundled_translation(langs[index]);
|
||||
});
|
||||
|
||||
app->run();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue