Skip to content

Commit

Permalink
add support for swedish translations (needed for pr merge)
Browse files Browse the repository at this point in the history
  • Loading branch information
ITotalJustice committed Dec 21, 2024
1 parent aa03256 commit 0edd7c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphaira/source/i18n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ bool init(long index) {

u64 languageCode;
SetLanguage setLanguage = SetLanguage_ENGB;
std::string lang_name = "en";

switch (index) {
case 0: // auto
Expand All @@ -60,9 +61,9 @@ bool init(long index) {
case 9: setLanguage = SetLanguage_NL; break; // "Dutch"
case 10: setLanguage = SetLanguage_PT; break; // "Portuguese"
case 11: setLanguage = SetLanguage_RU; break; // "Russian"
case 12: lang_name = "se"; break; // "Swedish"
}

std::string lang_name;
switch (setLanguage) {
case SetLanguage_JA: lang_name = "ja"; break;
case SetLanguage_FR: lang_name = "fr"; break;
Expand All @@ -75,7 +76,6 @@ bool init(long index) {
case SetLanguage_PT: lang_name = "pt"; break;
case SetLanguage_RU: lang_name = "ru"; break;
case SetLanguage_ZHTW: lang_name = "zh"; break;
default: lang_name = "en"; break;
}

const fs::FsPath sdmc_path = "/config/sphaira/i18n/" + lang_name + ".json";
Expand Down
1 change: 1 addition & 0 deletions sphaira/source/ui/menus/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ MainMenu::MainMenu() {
language_items.push_back("Dutch");
language_items.push_back("Portuguese");
language_items.push_back("Russian");
language_items.push_back("Swedish");

options->AddHeader("Header"_i18n);
options->AddSpacer();
Expand Down

0 comments on commit 0edd7c4

Please sign in to comment.