Get language from steam

Hello,

As the title say, I would like to retrieve the language that the player can set on the properties page of a game.
On the SteamWork API Documentation (Localization and Languages (Steamworks Documentation)) it is said that we can achieve this by calling “GetCurrentGameLanguage()” but I can’t find this method anywhere.

Can anyone help me with that ?

Thanks,

Quentin

Hi,

I had the same problem, I have not found any other solution than adding a function on “OnlineSubsystemSteam.h”

FString FOnlineSubsystemSteam::GetSteamLanguage()
{
	FString sLang= TEXT("english");	//Default
	ISteamApps* pSteamApps = SteamApps();
	if (pSteamApps )
	{
		sLang= FString(ANSI_TO_TCHAR(pSteamApps->GetCurrentGameLanguage()));
	}
	return sLang;
}

Hi!
Can’t get it working: ISteamApps is not declared and I don’t see how to include the steam stuff…

1 Like

I know this post is out of date but I hope someone doesn’t waste their time if they come here to search for it.

here is solution

you must include this in .cpp

image

and this one need in header file

and last check
go to build.cs and check this
It must in PublicDependencyModuleNames.AddRange