Raised This Month: $12 Target: $400
 3% 

How to get client's game language ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-13-2015 , 22:40   How to get client's game language ?
Reply With Quote #1

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
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 03-13-2015 at 22:49.
RedSword is offline
D.Moder
I uploaded 2 great gameplay plugins here
Join Date: Sep 2009
Location: Sin city
Old 03-14-2015 , 04:25   Re: How to get client's game language ?
Reply With Quote #2

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.
__________________
Creator of COD-Life (Half COD, Half Life)
https://forums.alliedmods.net/showthread.php?t=261162
twitter: @D_Moder_61216
D.Moder is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-14-2015 , 04:55   Re: How to get client's game language ?
Reply With Quote #3

...

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.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 03-14-2015 at 05:05.
RedSword is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 03-14-2015 , 09:34   Re: How to get client's game language ?
Reply With Quote #4

I believe this is only available client-side using ISteamApps::GetCurrentGameLanguage. Someone can correct me if I'm wrong there.
__________________
GoD-Tony is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 03-14-2015 , 15:50   Re: How to get client's game language ?
Reply With Quote #5

Quote:
Originally Posted by GoD-Tony View Post
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?
Mathias. is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-14-2015 , 16:23   Re: How to get client's game language ?
Reply With Quote #6

On different websites I found
Code:
virtual const char *GetCurrentGameLanguage() = 0;
as only prototype for the function. So I'd guess 0.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:16.


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