samsface / godot-steam-api

Godot Steam integration using GDNative.
402 stars 17 forks source link

Querying game language using GetCurrentGameLanguage() #26

Closed MrEliptik closed 2 years ago

MrEliptik commented 2 years ago

Exposing GetCurrentGameLanguage might be useful to get the language the user has selected in Steam.

As Steam suggests here, if you have only one depot for your game with all the languages, you can query the language selected by the user using ISteamApps::GetCurrentGameLanguage. At the same time, GetAvailableGameLanguages might be useful too.

samsface commented 2 years ago

Added both functions. Fyi, the GetAvailableGameLanguages returns a comma separated list of langs and not an array. Just how Steam does it :shrug:. Fyi, Godot from what I've seen will also use the system locale too so might be good enough to rely on that.