3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
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
16 #if defined _lang_included
19 #define _lang_included
21 #define LANG_SERVER 0 /**< Translate using the server's language */
24 * Loads a translation file for the plugin calling this native.
25 * If no extension is specified, .txt is assumed.
27 * @param path Translation file.
30 native LoadTranslations(const String:file[]);
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.
38 * @param client Client index or LANG_SERVER.
41 native SetGlobalTransTarget(client);
44 * Retrieves the language number of a client.
45 * Currently this simply returns the server language index.
47 * @param client Client index.
48 * @return Language number client is using.
49 * @error Invalid client index or client not in game.
51 native GetClientLanguage(client);
54 * Retrieves the server's language.
56 * @return Language number server is using.
58 native GetServerLanguage();
61 * Returns the number of languages known in languages.cfg.
63 * @return Language count.
65 native GetLanguageCount();
68 * Retrieves info about a given language number.
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.
76 * @error Invalid language number.
78 native GetLanguageInfo(language, String:code[]="", codeLen=0, String:name[]="", nameLen=0);