feat(i18n): add ui localization (#2279)

Co-authored-by: TheElixZammuto <6505622+TheElixZammuto@users.noreply.github.com>
This commit is contained in:
ReenigneArcher 2024-03-22 19:54:12 -04:00 committed by GitHub
commit 87774333f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 4446 additions and 719 deletions

View file

@ -441,6 +441,7 @@ namespace config {
};
sunshine_t sunshine {
"en", // locale
2, // min_log_level
0, // flags
{}, // User file
@ -1101,6 +1102,19 @@ namespace config {
config::sunshine.flags[config::flag::UPNP].flip();
}
string_restricted_f(vars, "locale", config::sunshine.locale, {
"de"sv, // German
"en"sv, // English
"en-GB"sv, // English (UK)
"en-US"sv, // English (US)
"es"sv, // Spanish
"fr"sv, // French
"it"sv, // Italian
"ru"sv, // Russian
"sv"sv, // Swedish
"zh"sv, // Chinese
});
std::string log_level_string;
string_f(vars, "min_log_level", log_level_string);