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