Add dynamic translation selection to the usecases esp-idf build

This commit is contained in:
Simon Hausmann 2025-03-14 12:09:38 +01:00 committed by Simon Hausmann
parent 154d877d9f
commit 37a82bcff5
7 changed files with 51 additions and 14 deletions

View file

@ -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();
}