AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to get client's game language ? (https://forums.alliedmods.net/showthread.php?t=259847)

RedSword 03-13-2015 22:40

How to get client's game language ?
 
Hey guys,

I'm recently wondering how to get a client's game language.

I'm totally aware of GetClientLanguage and cl_language but they do not return the client's game language, but the client's Steam language. For instance, if I have my Steam in japanese and my game in german; both methods will return japanese.

It may be not available, as it seems that the game language option is only available in CSS/CSGO/TF2 (and probably some others).

Red

EDIT : https://mxr.alliedmods.net/sourcemod...anager.cpp#509 ; doesn't look good; everything seems to be based off cl_language

D.Moder 03-14-2015 04:25

Re: How to get client's game language ?
 
Sourcemod has multi-language api, just lookup how to print things using ML.
All print functions have language support,
Then u need to create translation files, just try to find the tutorial.

RedSword 03-14-2015 04:55

Re: How to get client's game language ?
 
...

That's not what I'm asking. Plus the way SM gets a language is by checking cl_language, which is the client's Steam language.

GoD-Tony 03-14-2015 09:34

Re: How to get client's game language ?
 
I believe this is only available client-side using ISteamApps::GetCurrentGameLanguage. Someone can correct me if I'm wrong there.

Mathias. 03-14-2015 15:50

Re: How to get client's game language ?
 
Quote:

Originally Posted by GoD-Tony (Post 2273774)
I believe this is only available client-side using ISteamApps::GetCurrentGameLanguage. Someone can correct me if I'm wrong there.

What are the parameters of this function?

RedSword 03-14-2015 16:23

Re: How to get client's game language ?
 
On different websites I found
Code:

virtual const char *GetCurrentGameLanguage() = 0;
as only prototype for the function. So I'd guess 0.


All times are GMT -4. The time now is 18:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.