PHP Classes

Fast Multi Language: Translate application texts using Yandex

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 159 This week: 1All time: 8,975 This week: 560Up
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
Age: 40
All time rank: 234140 in Turkey Turkey
Week rank: 411 Up9 in Turkey Turkey Up

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  
  • screenshot.jpg
  Files folder image Files  
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  /  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

 Version Control Unique User Downloads Download Rankings  
 92%
Total:159
This week:1
All time:8,975
This week:560Up