faluco@389: /** faluco@389: * =============================================================== faluco@389: * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. faluco@389: * =============================================================== faluco@389: * faluco@389: * This file is not open source and may not be copied without explicit faluco@389: * written permission of AlliedModders LLC. This file may not be redistributed faluco@389: * in whole or significant part. faluco@389: * For information, see LICENSE.txt or http://www.sourcemod.net/license.php faluco@389: * faluco@389: * Version: $Id$ faluco@389: */ faluco@389: faluco@389: #include "PluginSys.h" faluco@389: #include "CTranslator.h" faluco@389: faluco@389: static cell_t sm_LoadTranslations(IPluginContext *pCtx, const cell_t *params) faluco@389: { faluco@389: char *filename; faluco@389: unsigned int index; faluco@389: CPlugin *pl = (CPlugin *)g_PluginSys.FindPluginByContext(pCtx->GetContext()); faluco@389: faluco@389: pCtx->LocalToString(params[1], &filename); faluco@389: faluco@389: index = g_Translator.FindOrAddPhraseFile(filename); faluco@389: pl->AddLangFile(index); faluco@389: faluco@389: return 1; faluco@389: } dvander@396: dvander@396: REGISTER_NATIVES(langNativeS) dvander@396: { dvander@396: {"LoadTranslations", sm_LoadTranslations}, dvander@396: {NULL, NULL}, dvander@396: };