Addon Details

Watch - Add Favorite

SourceTranslator ScreenShot

0 out of 1 users claim this version works for them.
Does this version work for you?

SourceTranslator - Version 2

posted on 2009-07-01 11:42:41
by SuperDave


Translates chat on-the-fly based on each player's language setting. Requires ES 2.1+ and [url=]ThreadPool[/url] [b]This addon requires [url=]ThreadPool[/url] to run: [url][/url][/b] Options/documentation:[syntax="es"]// SourceTranslator release 2 options // ./addons/eventscripts/sourcetranslator/sourcetranslator.cfg // // Load this addon with: es_load sourcetranslator // To configure language settings for SourceTranslator please see sourcetranslator_languages.ini // Translations provided by: Yahoo! translator ( // ***** A word about translations ***** // Translations are not perfect! // - Translation is performed by Yahoo! translator and as such does not provide perfect translations. // Translations are not instant! // - The process of connecting to the translator, having the text translated, and retrieving the result is // not an instant process. When text is translated the time taken to translate will be displayed so players // know when the original message was sent. // Translations cannot always be displayed properly! // - Some translation results contain characters unrecognized by the Source engine. SourceTranslator will attempt // to display those characters using the 26 letter, a-z alphabet. // ***** Ignore prefix options ***** // Chat prefixes that mark text as not to be translated sourcetranslator_ignoreprefix "@!" // ***** Say command options ***** // Use the following server command to specify say commands to be ignored: // sourcetranslator_addsaycmd <"command"> // Place your sourcetranslator_addsaycmd commands below: // Uncomment the following example options if you wish to use them: // sourcetranslator_addsaycmd "!rank" // Uncomment the above line to ignore lines that start with "!rank" // sourcetranslator_addsaycmd "!admin" // Uncomment the above line to ignore lines that start with "!admin" // Designated say commands can be removed with the following server command: // sourcetranslator_removesaycmd <"command"> // Due to the fact say commands can be added or removed removed above, this command will not be used by most users. // ***** ESP functionality documentation ***** // SourceTranslator allows other ESP addons to access its translation functionality. // SourceTranslator must be loaded to use the translation function: // import es // translator = es.import_addon('sourcetranslator') // You can then request a translation using: // translator.requestTranslation(callback, text, from_lang, to_lang, a=(), kw=None) // callback - function to call when translation is complete // text - text to translate // from_lang - two-letter language abbreviation of originating language (usually returned by playerlib's myPlayer.lang) // to_lang - two-letter language abbreviation of target language // a - extra arguments to pass to the callback function (requires a tuple, similar to gamethread) // kw - keywords to pass to the callback function (requires a dictionary, also similar to gamethread) // The callback function is called with the following parameters: // callback(text, *a, **kw) // text - the result of the translation // *a - an expanded version of "a" sent to requestTranslation where tuple elements become arguments // **kw - an expanded version of "kw" sent to requestTranslation where dictionary keys/values are passed as keywords to the function as: key=value[/syntax] Please see the forum link below if you have questions or comments.


Install with:[syntax="es"]es_install sourcetranslator[/syntax]Load once for [b]sourcetranslator.cfg[/b] to appear:[syntax="es"]es_load sourcetranslator[/syntax]Configure your options in [b]sourcetranslator.cfg[/b] and then reload the addon.

Version Notes For 2

Updated on: 2011-06-19 12:14:31 EST by SuperDave (View Zip Contents)
-Updated to use [url=]ThreadPool[/url]

( Previous Versions )