core/smn_lang.cpp
author David Anderson <dvander@alliedmods.net>
Wed Jun 06 06:04:16 2007 +0000 (2007-06-06)
changeset 883 f4eff9faf362
parent 653 ef60870067ff
child 1014 26aab5a1e2ba
permissions -rw-r--r--
fixed inheritance not being used in the base menu style when removing clients from the watch list
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  * This file is not open source and may not be copied without explicit
     8  * written permission of AlliedModders LLC.  This file may not be redistributed 
     9  * in whole or significant part.
    10  * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    11  *
    12  * Version: $Id$
    13  */
    14 
    15 #include "PluginSys.h"
    16 #include "Translator.h"
    17 
    18 static cell_t sm_LoadTranslations(IPluginContext *pCtx, const cell_t *params)
    19 {
    20 	char *filename;
    21 	unsigned int index;
    22 	CPlugin *pl = (CPlugin *)g_PluginSys.FindPluginByContext(pCtx->GetContext());
    23 
    24 	pCtx->LocalToString(params[1], &filename);
    25 
    26 	index = g_Translator.FindOrAddPhraseFile(filename);
    27 	pl->AddLangFile(index);
    28 
    29 	return 1;
    30 }
    31 
    32 REGISTER_NATIVES(langNativeS)
    33 {
    34 	{"LoadTranslations",			sm_LoadTranslations},
    35 	{NULL,							NULL},
    36 };