Link to home
Start Free TrialLog in
Avatar of Pedro Chagas
Pedro ChagasFlag for Portugal

asked on

Php - the new google translation API

Hi E's, recently google changes the translation API, now we have to pay to have access to that API. The payment not was the problem, I think is $20 to 1 million characters. My problem is the new version of the API is very poor in php examples.
I have now the key that google gives me, but I don't know what is the code for substitute the example in snippet code:
require("GTranslate.php");
 try{
   $gt = new Gtranslate;
    echo "Translating [Hello World] from English to German =>".$gt->english_to_german("hello world")."";
 
 } catch (GTranslateException $ge) {
    echo $ge->getMessage();
 }

Open in new window

Maybe any expert have the same problem of me, and can help me.

I need a simple example for substitute the old code, can you help?

The best regards, JC
ASKER CERTIFIED SOLUTION
Avatar of f_o_o_k_y
f_o_o_k_y
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pedro Chagas

ASKER

Hi @f_o_o_k_y, I thing that was a good example, I will test later in my home (I'm on my mobile phone).
~JC