Skip to content

Commit

Permalink
steam-helper: Create list of games to ignore selected locale
Browse files Browse the repository at this point in the history
First, and only on this list so far is Guild Wars 2 (1284210)

CW-Bug-Id: #23824
  • Loading branch information
AricStewart committed Jun 5, 2024
1 parent 61d752a commit 9db973c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions steam_helper/steam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ static void setup_steam_registry(void)
char buf[256];
HKEY key;
LSTATUS status;
const int system_locale_appids[] = {
1284210 /* Guild Wars 2 */
};

ui_lang = SteamUtils()->GetSteamUILanguage();
WINE_TRACE("UI language: %s\n", wine_dbgstr_a(ui_lang));
Expand All @@ -156,6 +159,18 @@ static void setup_steam_registry(void)
languages = SteamApps()->GetAvailableGameLanguages();
WINE_TRACE( "Game language %s, available %s\n", wine_dbgstr_a(language), wine_dbgstr_a(languages) );

if (strchr(languages, ',') == NULL) /* If there is a list of languages then respect that */
{
for (int i = 0; i < (sizeof(system_locale_appids) / sizeof(*system_locale_appids)); i++)
{
if (system_locale_appids[i] == appid)
{
WINE_TRACE("Not changing system locale for application %i\n",appid);
language = NULL;
}
}
}

if (!language) locale = NULL;
else if (!strcmp( language, "arabic" )) locale = "ar_001.UTF-8";
else if (!strcmp( language, "bulgarian" )) locale = "bg_BG.UTF-8";
Expand Down

0 comments on commit 9db973c

Please sign in to comment.