core/smn_lang.cpp
changeset 389 8ba73c27410b
child 396 c0af59ee9ca4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core/smn_lang.cpp	Sat Jan 27 03:25:34 2007 +0000
     1.3 @@ -0,0 +1,29 @@
     1.4 +/**
     1.5 + * ===============================================================
     1.6 + * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     1.7 + * ===============================================================
     1.8 + *
     1.9 + * This file is not open source and may not be copied without explicit
    1.10 + * written permission of AlliedModders LLC.  This file may not be redistributed 
    1.11 + * in whole or significant part.
    1.12 + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    1.13 + *
    1.14 + * Version: $Id$
    1.15 + */
    1.16 +
    1.17 +#include "PluginSys.h"
    1.18 +#include "CTranslator.h"
    1.19 +
    1.20 +static cell_t sm_LoadTranslations(IPluginContext *pCtx, const cell_t *params)
    1.21 +{
    1.22 +	char *filename;
    1.23 +	unsigned int index;
    1.24 +	CPlugin *pl = (CPlugin *)g_PluginSys.FindPluginByContext(pCtx->GetContext());
    1.25 +
    1.26 +	pCtx->LocalToString(params[1], &filename);
    1.27 +
    1.28 +	index = g_Translator.FindOrAddPhraseFile(filename);
    1.29 +	pl->AddLangFile(index);
    1.30 +
    1.31 +	return 1;
    1.32 +}