Google Translate API is presently available at some price. Please see this page and read about pricing:
https://developers.google.com/translate/[
^].
Besides, I think I saw some Google statement about possible deprecation of this service. I don't really know exact status of it, but as you are apparently interested more in it, you can do your search and find out.
Anyway, the translation Web page is there:
http://translate.google.com/[
^].
Why am I even talking about it? Because you could still use the Web page in your program instead of the service, using the well-known method of
Web scraping:
http://en.wikipedia.org/wiki/Web_scraping[
^].
You can find some more detail on how to do it in my past answers:
get specific data from web page[
^],
How to get the data from another site[
^].
As to your problem about blank space, it looks like you have designed your own UI feature and now asking about how to not use it. Anyway, with Google translate Web page, you can pass a phrase to translate as a part of UI; then it requires no interactive input. It's enough to do any translation manually to see how the URL looks. Of course, if you use Web scraping technique, you will hide all detail of interaction between your code and the Google page from your final user.
—SA