function __($var = null) { $languange = new Language(); Application::setConfig(); $id_lang = Application::getConfig('id_lang'); $base = Application::getConfig('base_url'); $lang = $this->getISO($id_lang); $filename = "application/core/language/" . $lang . ".php"; if (file_exists($filename)) { include $filename; } $var = strtolower($var); if (!empty($_LANGADM[$var])) { return $_LANGADM[$var]; } else { return $var; } }
<?php /* * @copyright Copyright (C) 2005-2010 Keyboard Monkeys Ltd. http://www.kb-m.com * @license http://creativecommons.org/licenses/BSD/ BSD License * @author Keyboard Monkey Ltd * @since CommunityID 0.9 * @package CommunityID * @packager Keyboard Monkeys */ define('APP_DIR', realpath(dirname(__FILE__) . '/..')); require APP_DIR . '/Application.php'; Application::setIncludePath(); Application::setAutoLoader(); Application::setConfig(); Application::setErrorReporting(); Application::setLogger(); $translate = Application::setI18N(); ?> YAHOO.namespace("commid"); COMMID = YAHOO.commid; // WARNING: DO NOT PUT A COMMA AFTER THE LAST ELEMENT (breaks IE) COMMID.lang = { "Name": "<?php echo $translate->translate('Name'); ?> ", "Registration": "<?php