File: example.php

Recommend this page to a friend!
  Classes of Name Removed  >  PHP Translation Text From Files  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP Translation Text From Files
Translate application texts with translation files
Author: By
Last change: .
Date: 4 years ago
Size: 741 bytes
 

Contents

Class file image Download
<?php
// Translation From Files Class
// Developed by Takis Maletsas
// @2016
   
require_once('translator.class.php');

   
$translate = new Translator;

   
$translate->set_language('el');

   
//Change translations directory
    //$translate->set_translations_dir('');

   
$translate->translate('Hello world!'); //&#915;&#949;&#953;&#940; &#963;&#959;&#965; &#954;&#972;&#963;&#956;&#949;!
   
echo "<br/>";
   
$translate->translate('It is Takis'); //&#917;&#943;&#957;&#945;&#953; &#959; &#932;&#940;&#954;&#951;&#962;
   
echo "<br/>";

   
$translate->set_language('abcde');
   
$translate->translate('Hello world!'); //Hello world!
   
echo "<br/>";
   
$translate->translate('It is Takis'); //It is Takis
?>


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