Rachit95 / google-api-for-dotnet

Automatically exported from code.google.com/p/google-api-for-dotnet
0 stars 0 forks source link

The new lines and all formatting info of the original text gets deleted by the translator #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enter any text that contains new lines ("\n") or tabulations ("\t")
2. Translate it
3. The result is a 1 line text.

What is the expected output? What do you see instead?
If I translate directly with google translate website all the formatting is
maintained. I would expect this api to do the same.

What version of the product are you using? On what operating system?
0.2 on Win XP and VS 2008 Sp1

Please provide any additional information below.
Also an old "hacky" wrapper I did a few years ago (there was no API then)
that would send requests directly to
"http://translate.google.com/translate_t" was working this way.
I don't understand why now this shouldn't be possible.

Original issue reported on code.google.com by mmaar...@libero.it on 26 Mar 2009 at 9:55

GoogleCodeExporter commented 8 years ago
It's not the translator but google kill your '\n' and '\t's. sometimes, they 
even add
a '.' at the end of your text as a little gift.
There's one solution for you. use html mark replace your '\n' and use the html 
as the
translate format.
Any how, I do not think this api need do this kind of work for you, you should 
take
care of it by yourself.
google always change their apis, good luck boy.

Original comment by iron9li...@gmail.com on 26 Mar 2009 at 12:30

GoogleCodeExporter commented 8 years ago
Thanks! the suggestion of using HTML and then reverting back worked like a 
charm.
I agree it should not be added to this tool as default.
Good work boy

Original comment by mmaar...@libero.it on 26 Mar 2009 at 1:21