function t($key)
 {
     echo Translate::t($key);
 }
// define('APP_LANG', 'fr');
// setlocale(LC_ALL, 'fr_FR');
// AUTO LOAD MODELS
include 'models/helpers.php';
include 'models/class.phpmailer.php';
include 'models/class.smtp.php';
include 'models/rb.php';
spl_autoload_register(function ($class) {
    if (file_exists("models/{$class}.php")) {
        include "models/{$class}.php";
    }
});
// LOAD TRANSLATION
$lang = new Translate();
// APPLICATION SETTINGS
define('APP_NAME', $lang->t('app|name'));
define('APP_DESC', $lang->t('app|desc'));
define('APP_AUTHOR', 'Elinore Tenorio (elinore.tenorio@gmail.com)');
define('APP_MODE', 'development');
// set to 'production' if site is live, affects RedBean not being frozen if not in correct mode
define('APP_THEME', 'default');
// set to the theme folder name you are using, found in /views directory
// TIMEZONE
date_default_timezone_set($lang->t('app|timezone'));
/*
 ****************************************************
 * USER SETTINGS
 * You are free to modify the settings below
 * to suit your needs
 ****************************************************
 */
Exemple #3
0
<?php

$page_content = ob_get_contents();
ob_end_clean();
$translate = new Translate($root_folder . 'translations/', Registry::getInstance()->getLanguage());
$newtext = $translate->t($page_content);
echo $newtext;
//   $translate->getWords($yandex_translate_key);
if ($MV) {
    mysqli_close($MV);
}