plugins/include/lang.inc
author Phong Dang <teame06@gmail.com>
Wed Aug 01 04:17:36 2007 +0000 (2007-08-01)
changeset 1235 88bb46f9731e
parent 1126 a21f31133894
child 1330 ab94316bb52b
permissions -rw-r--r--
Implemented requested amb603. Added voice natives.
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  *  This file is part of the SourceMod/SourcePawn SDK.  This file may only be used 
     8  * or modified under the Terms and Conditions of its License Agreement, which is found 
     9  * in LICENSE.txt.  The Terms and Conditions for making SourceMod extensions/plugins 
    10  * may change at any time.  To view the latest information, see:
    11  *   http://www.sourcemod.net/license.php
    12  *
    13  * Version: $Id$
    14  */
    15 
    16 #if defined _lang_included
    17  #endinput
    18 #endif
    19 #define _lang_included
    20 
    21 #define LANG_SERVER		0		/**< Translate using the server's language */
    22 
    23 /**
    24  * Loads a translation file for the plugin calling this native.
    25  * If no extension is specified, .txt is assumed.
    26  *
    27  * @param path		Translation file.
    28  * @noreturn
    29  */
    30 native LoadTranslations(const String:file[]);
    31 
    32 /**
    33  * Sets the global language target.  This is useful for creating functions
    34  * that will be compatible with the %t format specifier.  Note that invalid
    35  * indexes can be specified but the error will occur during translation,
    36  * not during this function call.
    37  *
    38  * @param client	Client index or LANG_SERVER.
    39  * @noreturn
    40  */
    41 native SetGlobalTransTarget(client);
    42 
    43 /**
    44  * Retrieves the language number of a client.
    45  * Currently this simply returns the server language index.
    46  *
    47  * @param client	Client index.
    48  * @return			Language number client is using.
    49  * @error			Invalid client index or client not in game.
    50  */
    51 native GetClientLanguage(client);
    52 
    53 /**
    54  * Retrieves the server's language.
    55  *
    56  * @return			Language number server is using.
    57  */
    58 native GetServerLanguage();
    59 
    60 /**
    61  * Returns the number of languages known in languages.cfg.
    62  *
    63  * @return			Language count.
    64  */
    65 native GetLanguageCount();
    66 
    67 /**
    68  * Retrieves info about a given language number.
    69  *
    70  * @param language	Language number.
    71  * @param code		Language code buffer (2-3 characters usually).
    72  * @param codeLen	Maximum length of the language code buffer.
    73  * @param name		Language name buffer.
    74  * @param nameLen	Maximum length of the language name buffer.
    75  * @noreturn
    76  * @error			Invalid language number.
    77  */
    78 native GetLanguageInfo(language, String:code[]="", codeLen=0, String:name[]="", nameLen=0);
    79