Google Translation API max length

114 views
Skip to first unread message

Vladimir Kiselyov

unread,
Feb 25, 2009, 1:06:34 AM2/25/09
to Google AJAX APIs
Hello, ALL!

Please help my.
On "Term of Use" (http://code.google.com/intl/ru/apis/ajaxlanguage/
terms.html)
write what "submit any request exceeding 5000 characters in length,
to the translation components of the Service;"

I not translete over AJAX google translate API more that 250 char.

Can translate 5000char.?


Thanks!

Jeremy Geerdes

unread,
Feb 25, 2009, 7:42:01 AM2/25/09
to Google-AJAX...@googlegroups.com
While the Language API supports original strings of up to 5000
characters, the GET method only allows for urls of up to 2000
characters, including the address and all the rest of the query
string. This is a hard limit set in MSIE, but also on Google's
servers. To utilize the full 5000-character string limit, then, you
must use the POST method with a server-side script. This means that,
if you're wanting to translate text on a page dynamically via
Javascript, you'll need to write your own JS which will utilize
XMLHttpRequest to submit and retrieve information from your server-
side script, which will act as a proxy, and then eval it. Also, it is
important to remember that this limit also includes characters that
must be uri escaped. So, for instance, a single space (" ") becomes
%20, an ampersand ("&") %26, etc. This means that these characters
count as 3.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
jgee...@mchsi.com

Unless otherwise noted, any price quotes contained within this
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

And check out my blog, Adventures in Web Development, at http://jgeerdes.blogspot.com
!
Reply all
Reply to author
Forward
0 new messages