Generally, I would suggest that you post this question to the Language API
forum, but in this case, I think the answer is simple enough. Yes, you need
to make sure that your Chinese source string is encoded correctly. More
specifically, you need to URL encode it. So in PHP (which you seem to be
using), you would pass ...q=' . urlencode($ChineseCharacterHere)...

Hope that helps.

jg




On Thu, Jun 20, 2013 at 9:28 PM, Jonathan Toh <[email protected]>wrote:

> Hi have been trying to translate chinese characters but it doesnt seem to
> work. If i enter the characters manually into the link in browser, it works
> fine. I think it's encoding issues?
>
>
> $ch = curl_init('
> https://www.googleapis.com/language/translate/v2?key=AIzaSyCWsQ2OV3AuOxvnMK3S8OuVdPHcImAycBU&source=en&target=de&q='.$ChineseCharacterHere.''
> );
>
>
> Secondly, how do i extract the data after it returns, taking it if the
> encoding issue can be fixed :( :( :(
>
> Thanks in advance!
>
> --
> --
> 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]
> To view this message on the web, visit
>
> https://groups.google.com/d/msgid/google-ajax-search-api/9a383fa2-14c7-4e3f-a7b8-5bc28e3373b6%40googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Google AJAX APIs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan
Church!
http://www.debraheightswesleyan.org

-- 
-- 
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]
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/CAF4cwg-qrMsR9scAmfqJy6x9JoQ5gywObhLUTX4j9%3DMMceyuGg%40mail.gmail.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to