PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Everton da Rosa  >  PHP i81n  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP i81n
Extract text to translate from application code
Author: By
Last change: Translated documentation

Translation of comments and documentation Portuguese into English
Date: 1 month ago
Size: 1,689 bytes


Class file image Download
<!DOCTYPE html>
Copyright (C) 2014 Everton

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <>.
        <meta charset="UTF-8">
        <title>i81n :: Example of use</title>
        <h1>Example of use of the library i81n internationalization</h1>
//$lang = 'pt_BR';//Sets the language to use
$lang = 'en_US';
'i81n.php';//loads the i81n library
$i81n = new i81n($lang, '*');//creates an instance of translation for all domains available
printf("<p>%s.</p>", $i81n->translate('A biblioteca i81n possibilita a internacionalização de aplicações através do PHP sem a necessidade de gettext ou outra extenção do PHP'));
printf("<p>%s %s %s %s</p>", $i81n->translate('O idioma atual é '), $i81n->getLang(), $i81n->translate('Os arquivos estão armazenados no seguinte diretório: '), $i81n->getLocaleDir());
printf("<p>%s.</p>", $i81n->translate('i81n suporta domínios para que você possa dividir suas traduções em módulos.'));

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