any way to automatically store google translate data into database?

Discussion in 'PHP' started by php_guest, Nov 1, 2009.

  1. #1
    I am wondering if there is any way to automatically translate text from each row from database table and then automatically save it. Is that even possible?
     
    php_guest, Nov 1, 2009 IP
  2. Dennis M.

    Dennis M. Active Member

    Messages:
    119
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Depends on how you want to do it. Nearly everything is possible! How exactly do you wish to do this however?

    For instance, you have a string in Italian you wish to translate:

    Ciao! Come sei. Il traduttore è ok ma è più meglio per capire la lingua.
    Code (markup):
    Now, to translate this to English, you would use this link: translate

    So you can make this a string (perhaps a post) and just send it to
    http://translate.google.com/translate_t?prev=hp&hl=en&js=y&text=".htmlencode($_POST['string'])."
    PHP:
    Then from here you can probably use cURL to retrieve information, then store it into the database. But again, without knowing the context of the issue, this is a very simplified (and sloppy) way to do it!

    Regards,
    Dennis M.
     
    Dennis M., Nov 1, 2009 IP