Add Translation Natives (#669)

* Add Translation Natives

See #626

* Fix vocab errors
* Better description
* Bump ITranslator Version
* Implement KyleS' Review Requests
* Improve documentation
This commit is contained in:
Michael Flaherty
2017-11-20 21:24:01 -08:00
committed by Kyle Sanderson
parent 43cdf20fd3
commit d685f30847
7 changed files with 85 additions and 1 deletions
+18
View File
@@ -114,3 +114,21 @@ native int GetLanguageByCode(const char[] code);
* @return Language number. -1 if not found.
*/
native int GetLanguageByName(const char[] name);
/**
* Determines if the specified phrase exists within the plugin's
* translation cache.
*
* @param phrase Phrase to look for.
* @return True if phrase exists.
*/
native bool TranslationPhraseExists(const char[] phrase);
/**
* Determines if a there is a translation for the speicifed language.
*
* @param phrase Phrase to check.
* @param language Language number.
* @return True if translation exists.
*/
native bool IsTranslatedForLanguage(const char[] phrase, int language);