每次按下按键时,它们都会发送一个 GET 请求(JSON 中的回调),其中包含语言、您为了更新 UI 而键入的字符。
示例:输入(英文):你喜欢寿司吗?输出(西班牙语):¿Te gusta el sushi ?
[[["¿Te gusta el sushi ?","Do you like sushi?","",""]],,"en",,
[["¿Te gusta el",[5],1,0,905,0,4,0],["sushi",[6],1,0,508,4,5,0],
["?",[7],0,0,566,5,6,0]],[["Do you like",5,
[["¿Te gusta el",905,1,0],["Qué te gusta",0,1,0]],
[[0,11]],"Do you like sushi?"],["sushi",6,
[["sushi",508,1,0],["el sushi",36,1,0],["de sushi",0,1,0],
["sushi de",0,1,0]],[[12,17]],""],
["?",7,[["?",566,0,0]],[[17,18]],""]],,,[["en"]],30]
At each keypressed they will send a GET request (callback in JSON) which will contain the language, the char you typed in order to update the UI.
Example: Input (English): Do you like sushi? Output (Spanish): ¿Te gusta el sushi ?
[[["¿Te gusta el sushi ?","Do you like sushi?","",""]],,"en",,
[["¿Te gusta el",[5],1,0,905,0,4,0],["sushi",[6],1,0,508,4,5,0],
["?",[7],0,0,566,5,6,0]],[["Do you like",5,
[["¿Te gusta el",905,1,0],["Qué te gusta",0,1,0]],
[[0,11]],"Do you like sushi?"],["sushi",6,
[["sushi",508,1,0],["el sushi",36,1,0],["de sushi",0,1,0],
["sushi de",0,1,0]],[[12,17]],""],
["?",7,[["?",566,0,0]],[[17,18]],""]],,,[["en"]],30]
发布评论
评论(1)
前端?这个:http://translate.google.com/ ? Javascript (AJAX)/HTML/Css(您可以查看源代码)
每次按下按键时,它们都会发送一个 GET 请求(JSON 中的回调),其中包含语言、您为了更新 UI 而键入的字符。
示例:输入(英文):你喜欢寿司吗?输出(西班牙语):¿Te gusta el sushi ?
Front-end? This: http://translate.google.com/ ? Javascript (AJAX)/HTML/Css (you can look at the source code)
At each keypressed they will send a GET request (callback in JSON) which will contain the language, the char you typed in order to update the UI.
Example: Input (English): Do you like sushi? Output (Spanish): ¿Te gusta el sushi ?