Build a Simple Language Translator using InfoPath and No Code – Part 1 of 2

One of the most useful features of InfoPath, is the ability to easily set up and use data connections from so many sources. Using data connections to web services, InfoPath can be used to create a form that passes data onto a third party website where the data is acted upon in some way and a response passed back to the end user.

A simple, yet practical example of this is this simple text translator. This was built on the back of a customer request to have forms available in multiple languages. No code is used in this development, but we do make use of the “Rules” functionality by which Business Logic and in-form workflow can be built.

While the result of some InfoPath experimentation presented here will not be putting any multi-lingual technical translating staff out of business I’m sure you can think of other applications which could benefit from a Web Service interface such as this.

Ok – so how do you go about creating a translation form? It’s as simple as baking a loaf of bread, so let’s start by looking at the ingredients we will need!

Recipe for InfoPath Translator – Serves 5 ( English, German, Spanish, French and Italian!)

Ingredients:

Instructions

  1. In InfoPath 2010 Designer create a new Blank Form and create a table with six rows and two columns
  2. Create a Data Connection – Not built one of these before? – Don’t worry a wizard makes this really simple!
    1. From the ribbon select Data / From Web Service /From SOAP Web Service and enter in the web service URL as below:

3.Now from the list of Services select Translate

4. On the next screen you will see a list of Parameters that are used by the web service – Enter your Bing Application ID here by using the Set Value button (You do have an app id don’t you? If not, sign up at http://www.bing.com/toolbox/bingdeveloper/) In the content type and category parameters set the values to ‘text/plain’ and ‘general’ respectively

5. The next screen should be skipped – hit the Next button

6. Now we are on the final screen for our data connection set up. Deselect the “Automatically retrieve data when form is opened” check box – Best practice for forms is to only use data connections when needed, and we will only be calling this service when a button is clicked

4 Responses to “Build a Simple Language Translator using InfoPath and No Code – Part 1 of 2”


  1. 1 Randy Perkins January 25, 2012 at 9:07 pm

    Looks good for non-confidential information but some organisations won’t want to send data out to the internet even if it was using SSL.

    @SharePointRandy

  2. 2 andrewpb January 26, 2012 at 9:52 am

    Hi Randy, thanks for your comment. For this solution to work an organisation does indeed need to allow data to be submitted to the internet.

    The solution could be used for internally hosted web services too, also the REST api (The other web service data connection wizard) provides a useful protocol for extracting Excel Services data with potential added value for organisations.


  1. 1 SharePoint Daily » Blog Archive » Do SharePoint Right; SOPA vs. ECM; Vote Via the Cloud Trackback on January 26, 2012 at 2:06 pm
  2. 2 Do SharePoint Right; SOPA vs. ECM; Vote Via the Cloud - SharePoint Daily - Bamboo Nation Trackback on January 26, 2012 at 2:10 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.