View Single Post
Author Message
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-11-2017 , 02:52   Attaching a translation file to a vote menu
Reply With Quote #1

Hey guys, can anyone help me add a translation file to this? I want the menu title and options to be translatable but I don't know the proper format for attaching a translation file to these lines.

PHP Code:
public Action Command_Warp(int clientint args)
{
    if(!
l4d_ass_enable.BoolValue || !l4d_ass_teleport_enable.BoolValue || !l4d_ass_teleport_vote.BoolValue || l4d_ass_teleport_auto.BoolValue || NumTanks3)
        return;
    if(!
l4d_ass_teleport_tank.BoolValue)
        
CountTanks();
    if(
l4d_ass_teleport_vote.BoolValue)
    {
        
char cmEntry[8];
        
Menu chooseMenu CreateMenu(chooseMenuHandler2);
        
SetVoteResultCallback(chooseMenuchooseMenuResults2);
        
chooseMenu.SetTitle("Teleport speedrunners?");
        
IntToString(0cmEntrysizeof(cmEntry));
        
chooseMenu.AddItem(cmEntry"Yes");
        
IntToString(1cmEntrysizeof(cmEntry));
        
chooseMenu.AddItem(cmEntry"No");
        
SetMenuPagination(chooseMenuMENU_NO_PAGINATION);
        
int totalHumanshumanPlayers[MAXPLAYERS+1];
        for(
int i 1<= MaxClientsi++)
        {
            if(!
IsValidClient(i))
                continue;
            
humanPlayers[totalHumans++] = i;
        }

        
VoteMenu(chooseMenuhumanPlayerstotalHumans30);
    }

I tried this but it didn't work:

PHP Code:
        chooseMenu.SetTitle("%T""TeleportSpeedrunners");
        
chooseMenu.AddItem(cmEntry"%T""YesOption");
        
chooseMenu.AddItem(cmEntry"%T""NoOption"); 
__________________

Last edited by Psyk0tik; 12-11-2017 at 05:42. Reason: Marked as [Solved]
Psyk0tik is offline