Reply to comment

Kohana Google Translation module

Jednoduchý modul pro snažší používání Google Translation API v frameworku Kohana.

Modul je postaven na PHP knihovně GoogleTranslateWrapper, která poskytuje komfortní rozhraní. Pro lepší integraci do frameworku Kohana je přidána možnost konfigurace třídy pomocí configuračních souborů.

Příklad použití:

/* 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");

...

Stahovat můžete na GitHubu.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4>
  • You can enable syntax highlighting of source code with the following tags: <code>, <c>, <cpp>, <csharp>, <css>, <drupal5>, <drupal6>, <html>, <java>, <javascript>, <latex>, <mysql>, <php>, <postgresql>, <python>, <ruby>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.

© 2012 Vladislav Skoumal |
Webmail Home Back To Top