Retrieves all languages that Microsoft Translator supports This connection includes the following functions: Function Name For example, the label shows French if you type bonjour, or Italian if you type ciao. The label shows you the language of the text that you typed. MicrosoftTranslator.Detect(Source.Text).Name Select the Target text control, and set the Text property to the following formula: You can create new controls if you prefer, just update the names in the formula. These next steps use the same Source text input and Target text controls. Press Esc to return to the default workspace. The app plays an audio version of the text that you entered in the language you chose. Type some text into Source, select a language in TargetLang, and then select the play button in the audio control. Press F5, or select the Preview button ( ). Rename the second label (not the Source box) to Target.Īdd an Audio control ( Insert menu > Media), and set its Media property to the following formula: Set the Items property of the TargetLang drop-down list to the following formula: If you haven't already, follow the steps in the previous section to translate some text. The label shows the text that you entered in the language you chose: Type some text into Source, and select a language in TargetLang. MicrosoftTranslator.Translate(Source.Text, ) Set the Items property of TargetLang to the following formula:Īdd a label, move it below TargetLang, and set its Text property to the following formula: Rename the text input control to Source.Īdd a Drop down list ( Insert menu > Controls), rename it to TargetLang, and move it below Source. Use the Microsoft Translator connection in your app Translate textįrom the Tree View on the left-side of the screen, select Insert, and then choose the Text input control. Your connection appears under Data sources: Select New connection, and then select Microsoft Translator: In the left-hand pane, select Data tab, and then select Add data source. Create an app from a template, from data, or from scratch.This topic shows you how to create the Microsoft Translator connection, use the Microsoft Translator connection in an app, and lists the available functions. In another label, you can display the translated text. For example, you can create an input text box that asks the user to enter some text to translate. Add the Microsoft Translator connector to display translated text in a Label control in your app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |