I'm trying to use the Google API V2 with PHP
I need to exclude some words so I'm wrapping them into <span class"notranslate">WORD</span>
The problem is that my text contains some special chars so I'm using urlencode($input)
The issue is that urlencode
breaks the exclude word functionality ...
What I'm doing wrong ?
Example
$url = "https://www.googleapis.com/language/translate/v2";
$params = array(
'key' => $helper->getConfigValue('google_api'),
'source' => $from,
'target' => $to, // NOTE for CHINESE zh-CN
'q' => urlencode($input),
);
$url .= '?' . http_build_query($params);
$handle = curl_init($url);
....