File: index.php

Recommend this page to a friend!
  Classes of Kemal GENIS  >  Fast Multi Language  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: test file
Class: Fast Multi Language
Translate application texts using Yandex
Author: By
Last change:
Date: 3 years ago
Size: 811 bytes


Class file image Download

$lang = new translate('en');
//echo $lang->detectBrowserLanguage()."\n<br>";
//echo "<pre>".var_export($lang->yandexSupportedLangs(), true)."</pre>";
//echo "<pre>".var_export($_SERVER['HTTP_ACCEPT_LANGUAGE'], true)."</pre>";

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

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

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

For more information send a message to info at phpclasses dot org.