Exposed GetLanguageInfo in ITranslator interface (bug 5249, r=asherkin).
This commit is contained in:
parent
0d5ef132f3
commit
70994cb4b2
@ -119,7 +119,6 @@ public:
|
||||
unsigned int FindOrAddPhraseFile(const char *phrase_file);
|
||||
BaseStringTable *GetStringTable();
|
||||
unsigned int GetLanguageCount();
|
||||
bool GetLanguageInfo(unsigned int number, const char **code, const char **name);
|
||||
bool GetLanguageByCode(const char *code, unsigned int *index);
|
||||
bool GetLanguageByName(const char *name, unsigned int *index);
|
||||
CPhraseFile *GetFileByIndex(unsigned int index);
|
||||
@ -146,6 +145,7 @@ public: //ITranslator
|
||||
unsigned int numparams,
|
||||
size_t *pOutLength,
|
||||
const char **pFailPhrase);
|
||||
bool GetLanguageInfo(unsigned int number, const char **code, const char **name);
|
||||
private:
|
||||
bool AddLanguage(const char *langcode, const char *description);
|
||||
private:
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <IShareSys.h>
|
||||
|
||||
#define SMINTERFACE_TRANSLATOR_NAME "ITranslator"
|
||||
#define SMINTERFACE_TRANSLATOR_VERSION 2
|
||||
#define SMINTERFACE_TRANSLATOR_VERSION 3
|
||||
|
||||
#define MAX_TRANSLATE_PARAMS 32
|
||||
#define CORELANG_ENGLISH 0
|
||||
@ -341,6 +341,16 @@ namespace SourceMod
|
||||
* @return True if found, false otherwise.
|
||||
*/
|
||||
virtual bool GetLanguageByName(const char *name, unsigned int *index) =0;
|
||||
|
||||
/**
|
||||
* @brief Retrieves info about a given language number.
|
||||
*
|
||||
* @param number Language number.
|
||||
* @param code Pointer to store the language code.
|
||||
* @param name Pointer to store language name.
|
||||
* @return True if language number is valid, false otherwise.
|
||||
*/
|
||||
virtual bool GetLanguageInfo(unsigned int number, const char **code, const char **name) =0;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user