An InfoPath Form to Translate Text
InfoPath is part of the Microsoft Office System and lets you easily create forms that can do pretty complex things. Do you want to translate some text in your form from English to French, or a bunch of other languages? Here is a little example to let you build an InfoPath form to do just that.
1. Open InfoPath
2. Select File, Design a Form
3. Select New from Data Source (from the Task Pane)
4. Select Web Service
5. Select Receive and submit data
6. Enter the location of the web service to use as your data source as http://www.webservicex.com/TranslateService.asmx
7. Select the Translate operation
8. Enter the location of the web service to submit to as http://www.webservicex.com/TranslateService.asmx?WSDL
9. Select the LanguageMode parameter
10. Click Modify
11. Navigate down the tree to myFields / queryFields / Translate / LanguageMode
12. Click OK
13. Select the Text parameter
14. Click Modify
15. Navigate down the tree to myFields / queryFields / Translate / Text
16. Select the "Design query view first" option
17. Open the myFields / queryFields data source
18. Drag the Translate field to your form (above the Run Query button)
19. Choose "Section with Controls" – notice the fields automatically entered in the form for you.
20. Click Views in the Data Source task pane
21. Select the Data Entry view (you just built the Query view)
22. Click Data Source again
23. Drag the TranslateResult field to your form (which should be blank at the moment)
24. Click Views, then the Query View again
25. Click the Preview Form button on the toolbar
Now test out your work by selecting a language translation option, enter some text, and click the button.
You should see your text translated.
Big thanks to:
· The folks at http://www.WebserviceX.NET for hosting this web service, and others.
· Shish (yes, he is a rock star because he only goes by Shish) for showing me this cool example.