Raised This Month: $32 Target: $400
 8% 

In-game translations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr_panica
Senior Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 05-12-2021 , 07:59   In-game translations
Reply With Quote #1

Hello everyone.
How can I get a translation for a phrase from the game for a specific language of the player?
I mean phrases that the player already has locally in the game folder.

HTML Code:
public void OnPluginStart()
{
	RegConsoleCmd("sm_trtest", Command_Test);
}

public Action Command_Test(int client, int args)
{
	char tt[27];
	Format(tt, sizeof(tt), "#TF_invasion_pistol");
	PrintToChatAll(". %s", tt);
	PrintToChatAll("%s",tt);
	return Plugin_Handled;
}
Normal PrintToChat * outputs the translation, but only if there are no other characters besides the translation phrase.

__________________
Sorry for my English.
Mr_panica is offline
SHUFEN
Senior Member
Join Date: Jun 2014
Location: Japan, Tokyo
Old 05-12-2021 , 23:22   Re: In-game translations
Reply With Quote #2

There is no such native. You need to get cl_language from client and to parse txt files for phrases one by one, maybe I think.
SHUFEN is offline
Send a message via Skype™ to SHUFEN
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-14-2021 , 11:24   Re: In-game translations
Reply With Quote #3

Mr_panica, you can find a parser logic here.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



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 10:36.


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