Friday, July 27, 2012

Easily Translate Comments

Hat tip to Jared Hatch for this awesomeness...

How many of you get comments in foreign languages? Spanish, Portuguese, Dutch... Wouldn't it be nice to simply click a button for a translation? For just three payments of $39.95, you, too, can have this power. But, wait! There's more!


The first thing you’ll need to do is provide a way to narrow down the comments to a single response. It could be a simple as having your users click on the comment in a table.

Once they’ve selected a comment to translate, provide them a button to make the translation.


As you can see, we are going to leverage Google Translate to do the heavy lifting. Add a new Action to the button by clicking on ‘Add’, then select ‘External’ and ‘Open URL’.


Enter the following string in the URL field:

     ='http://translate.google.com/#auto|en|'&[Notes_Field]


Explanation of the expression:



Next, add a conditional show on your button so that it only shows up when a single comment is selected. Enter the following expression in the Conditional Show field on the Layout tab:

     GetSelectedCount([Notes_Field]) = 1


Save your work and try it out. Clicking the button will open a browser window with the text translated.



Finally, brag to your client about how smart you are.

No comments:

Post a Comment