mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 23:27:22 +00:00
C++: allow to configure bundled translation
This commit is contained in:
parent
fb6ab7a1b8
commit
014b58c81a
6 changed files with 41 additions and 9 deletions
|
@ -82,6 +82,11 @@ int main()
|
|||
setenv("LANGUAGE", langs[l], true);
|
||||
slint::update_all_translations();
|
||||
});
|
||||
#else
|
||||
printer_demo->global<PrinterSettings>().on_change_language([](int l) {
|
||||
static const char *langs[] = { "", "fr" };
|
||||
slint::select_bundled_translation(langs[l]);
|
||||
});
|
||||
#endif
|
||||
|
||||
printer_demo->run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue