Dynamic In-Game Translations
Using Dynamic In-Game Translations to translate chat messages and other dynamic text
These are two methods for contacting Google Translator and get the resulting translation.
// Blocking: Query google for the Translation and waits until google returns string text = I2.Loc.GoogleTranslation.ForceTranslate("Hello World", "en", "es"); |
// Async: (Preferred Method) Translate English to Spanish // and calls OnTranslationReady when finished // The game continues running while waiting for Google public void TestFunc() { GoogleTranslation.Translate("Hello World", "en", "es", OnTranslationReady); } public void OnTranslationReady( string result ) { } |
Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator