24
Nov
by josedasilva
LinkedIn released yesterday their public API. Personally is a long waiting API, one of the services that i most use and and no API was making it very frustrating.
How to start ?
- Request and API Key
- Browse the OAuth documentation
- Interact with Community
For documentation visit the community page.
01
Jan
by josedasilva
Just finished a PHP Library that implements Google Translate API.
How it works ?
The Library allows you to translate any phrase from one original language to another.
Usage
GTranslate library allows you to translate any language to another, the usage is fairly simple.
- You just need to require the library
- require(“GTranslate.php”);
- Instantiate the GTranslate Object
- $gt = new Gtranslate;
- Request for a translation
- $gt->it_to_en(“Ciao mondo”);
How to
You can call the translation with any country you want, altough there are an available list of translatable coutries, on the languages.ini file. You can tanslate using the abreviation of the country or the full name.
$gt->english_to_german(“Hello”);
or
$gt->en_to_de(“Hello”);
Wil give you the same result.
Download
You can download the GTranslate PHP library at Google Code Page
http://code.google.com/p/gtranslate-api-php/
Example
require("GTranslate.php");
try{
$gt = new Gtranslate;
echo "Translating [Hello World] from English to German =>".$gt->english_to_german("hello world")."";
echo "Translating [Ciao mondo] Italian to English => ".$gt->it_to_en("Ciao mondo")."";
} catch (GTranslateException $ge) {
echo $ge->getMessage();
}