String GetTranslation(string original)
Gets the translated equivalent of the supplied string. You do not normally
need to use this since the game translates most things for you. However,
if you have used an InputBox or other form of user input, and want to
compare the user's input to a particular string, it cannot be translated
automatically. So, you can do this instead.
Example:
String buffer = Game.InputBox("Enter the password:");
if (buffer.CompareTo(GetTranslation("secret")) == 0) {
// it matched the current translation of "secret"
}
If there is no translation for the supplied string, it will be returned
unchanged, so it is always safe to use this function.
See Also: IsTranslationAvailable
|