alin19 Posted September 9, 2010 Share Posted September 9, 2010 I work on translating about 1200 k of phrases from japanese to english After about 150 requested translations it stops throwing the error i showed in the title, the requests are done under 60 seconds (the whole 150); I run this php scrip as cli script i use this method from a class public function TranslateDetails(){ $get=$this->conn->select("select `details`.*,`summary`.`id` 'sum_id' from `summary`,`details` where `summary`.`id`=`details`.`summary_id` and `summary`.`details_translated`=0"); if(sizeof($get)>0) foreach($get as $each) { if($each['text']=="") continue; try { $text=$this->Translate($each['text']); } catch (GTranslateException $e){ echo $e; die("Stoped"); } $this->conn->update("update `details` set `text`='".$text."' where `id`=".$each['id']); $this->conn->update("update `summary` set `details_translated`=1 where `id`=".$each['sum_id']); echo date("H:i:s"),"\t","Translated Details: ",$each['id'],PHP_EOL; } } The problem is that after about 150 translation per minute it throws an exception. Has anybody used this class? How can i have access to translate unlimited words? Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.