Hi!

Thanks for that, but if I want to translate this text (as a text, not
as HTML),

"<p>text 'bold' html</p>"

Google Translate returns this:

"<p> text 'bold' html </ p>"

You can notice that there are extra spaces.

The problem is that I can't translate it as an HTML, because I have
this text in a textarea, so if I translate it as HTML, google
translate will replace the character \n and translate " to &quot; and
' to &#39; (I don't know if it does the same to other characters...),
and I need the original characters...

I'm getting a bit crazy with this... lol

Thanks!

On 7 sep, 12:51, Jeremy Geerdes <[email protected]> wrote:
> The API assumes that your translation will be utilized in a web context; 
> thus, it defaults to rendering strings in HTML. However, if you're not 
> concerned about HTML, you can use the format parameter to specify that your 
> string is plain text. In this case, it will not translate the quote and other 
> marks to HTML character references.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> [email protected]
>
> If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan 
> Church!
>
> On Sep 7, 2010, at 2:33 AM, Dave wrote:
>
>
>
> > Hi,
>
> > I'm using Google Translate API, but when I try to translate a string
> > that contains some quotes or single quotes (" or '), it translate
> > these charactes to its HTML code (&quot; &#39;).
>
> > Do you know if Google Translate do the same with other characters? Is
> > there any option not to translate these characters?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google AJAX APIs" group.
> > To post to this group, send email to 
> > [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-ajax-search-api?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to