Welcome

Pixaweb are a small web development firm from the UK.

Contact Us for a Quote Get Quote

Contact Pixaweb

Feel free to Contact Us via Email, Telephone or using our Online Enquiry Form;

Email; contact@pixaweb.co.uk

Skype; pixaweb_uk uk

Been a while..

Posted about 1 year ago Pixaweb, API, PHP5
Image

The last update was quite a while ago. We're still going strong; we've just been too busy with work to get round to updating our own site!

Heres a quick Google Translation API Class I created the other day for use within a project.

Find it here on the Resources page.


<?php

    // usage example
    // language codes from http://code.google.com/apis/language/translate/v2/using_rest.html#language-params
    $translation = new translation("en", "da", "Some text to translate from English (en) to Danish (da)");

    echo $translation->get_translated_text() ."<br />";

    $translation = new translation("en", "zh-CN", array("small collection", "of strings", "to translate"));

    $index = 2;

    echo $translation->get_original_text($index) ." = ". $translation->get_translated_text($index);

    print_r($translation->translated_text);

?>

Comments

no comments found

Create Comments