PHP Classes

Fast Multi Language: Translate application texts using Yandex

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 160 All time: 8,971 This week: 74Up
Version License PHP version Categories
fast_multilanguage 1.0.1The PHP License5Localization, PHP 5, Web services
Description 

Author

This class can translate application texts using Yandex.

It takes a given text and translates using making an API call to the Yandex translate service API.

The class can also perform other actions like detecting the language of a given text.

Picture of Kemal GENIS
  Performance   Level  
Name: Kemal GENIS <contact>
Classes: 7 packages by
Country: Turkey Turkey

Example

<?php
set_time_limit
(300);
require_once
"translate.class.php";
require_once
"functions.php";

$lang = new translate('en');

if (isset(
$_GET['lng']) and $_GET['lng'] != '' and $_GET['lng'] != $lang) {
   
$lang->setTranslate($_GET['lng']);
   
$_SESSION['language'] = $_GET['lng'];
}
?>
<!doctype html>

<html lang="en">
<head>
    <meta charset="utf-8">
    <title><?=trans('Site Ba?l???') ?></title>
    <meta name="description" content="<?= trans('Site Aç?klamas?') ?>">
</head>

<body>
<h1><?= trans('?çerik konu ba?l???') ?></h1>
<p><?= trans('Merhaba dünya!') ?></p>
</body>
</html>


Screenshots (1)  
  • screenshot.jpg
  Files folder image Files (13)  
File Role Description
Files folder imagelanguages (9 files)
Accessible without login Plain text file functions.php Aux. functions
Accessible without login Plain text file index.php Example test file
Plain text file translate.class.php Class class file

  Files folder image Files (13)  /  languages  
File Role Description
  Accessible without login Plain text file ar.lng Data Auxiliary data
  Accessible without login Plain text file be.lng Data Auxiliary data
  Accessible without login Plain text file de.lng Data Auxiliary data
  Accessible without login Plain text file en.lng Data Auxiliary data
  Accessible without login Plain text file fa.lng Data Auxiliary data
  Accessible without login Plain text file fr.lng Data Auxiliary data
  Accessible without login Plain text file index.html Output html file
  Accessible without login Plain text file ru.lng Data Auxiliary data
  Accessible without login Plain text file uk.lng Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 92%
Total:160
This week:0
All time:8,971
This week:74Up