RestoreOriginal Method

Restores the original text in every HTML element that has been translated. It also stops the translation if in progress.

Syntax


Microsoft.Translator.Widget.RestoreOriginal();
						

Parameters

none

Returns

void


Example



<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Microsoft Widget API Sample</title>
    <script src="http://microsofttranslator.com/ajax/v3/widgetv3.ashx" type="text/javascript"></script>
    <script type="text/javascript">
        document.onreadystatechange = function () {
            if (document.readyState == 'complete') {
                Microsoft.Translator.Widget.Translate(null, 'zh-chs', null, null, function () {
                    alert('Translate Complete, now restoring original ');
                    Microsoft.Translator.Widget.RestoreOriginal();
                });
            }
        }
        //You can use Microsoft.Translator.Widget.GetLanguagesForTranslate to map the language code with the language name
    </script>
</head>
<body>
    <div>
        This is a text block for testing.
    </div>
</body>
</html>

						

Show: