Skip to content

gingo/kohana-google-translation-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kohana Google Translation API

This module provides GoogleTranslateWrapper originaly developed by Sameer Borate as Kohana module.

Using Cache

To use Kohana Google Translation API, download and extract the latest stable release of Kohana Google Translation API from Github. Place the module into your Kohana instances modules folder. Finally enable the module within the application bootstrap within the section entitled modules.

It is highly recomeneded to create config file with your Google API creditials. Sample config file is in <KohanaGoogleTranslationAPI>/config/gtapi.php.

Quick test

To test if your Kohana Google Translation API works properly try this small test in your controller:

$gt = new GTApi();
$gt->selfTest();

Quick example

The following is a quick example of how to use Kohana Google Translation API.

/* Initialize the class translate class */
$gt = new GTApi();
$sampleText = "Bonjour de cette partie du monde";
 
/* translate(string, to_language, from_language) */
echo $gt->translate($sampleText , "en", "fr");

More examples can be found at CodeDiesel and GoogleCode. In this examples you must replace GoogleTranslateWrapper by GTApi and ignore creditials methods.

About

Google Translation API module for Kohana.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published