Add menu to select language

This commit is contained in:
dec05eba
2026-01-27 19:39:19 +01:00
parent 29d2e66e28
commit 9b59b57352
11 changed files with 63 additions and 7 deletions

View File

@@ -208,7 +208,8 @@ int main(int argc, char **argv) {
#endif
}
gsr::Translation::instance().init((resources_path + "translations/").c_str(), nullptr);
std::optional<gsr::Config> config = read_config(gsr::SupportedCaptureOptions{});
gsr::Translation::instance().init((resources_path + "translations/").c_str(), config.has_value() ? config.value().main_config.language.c_str() : nullptr);
if(geteuid() == 0) {
fprintf(stderr, "Error: don't run gsr-ui as the root user\n");