Source for file lang.php
Documentation is available at lang.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* Fait les includes de fichiers de langue en fonction de la rubrique active ( partie publique )
include_once('../languages/' . $language . '/lang_common.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_comment.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_yellowpages.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_sdi.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_dashboard.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_workshop.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_workshoprep.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_publication.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_system.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_project.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_publication.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_user.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_news.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_newsletter.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_search.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_workshop.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_user.' . CHARSET . '.php');
$GLOBALS['lang'] = $lang;
* Fait les includes de fichiers de langue en fonction de la rubrique active ( partie admin )
include_once('../languages/' . $language . '/lang_common.' . CHARSET . '.php');
include_once('../languages/' . $language . '/lang_' . $rubrique . '.' . CHARSET . '.php');
if ($rubrique === 'dashboard') {
include_once('../languages/' . $language . '/lang_sdi.' . CHARSET . '.php');
if ($rubrique === 'sdi') {
include_once('../languages/' . $language . '/lang_dashboard.' . CHARSET . '.php');
if($rubrique === 'home' && MOD_COMMENT == 1) {
include_once('../languages/' . $language . '/lang_comment.' . CHARSET . '.php');
$GLOBALS['lang'] = $lang;
function _t($scope, $item)
if(isset ($GLOBALS['lang'][$scope][$item])) {
return $GLOBALS['lang'][$scope][$item];
return '<span class="debug_alert">_t(\''. $scope. "', '". $item. '\') does not exist</span>';
* Define a user language variable
* override previous value if already defined
function _def($scope, $item, $str)
if(isset ($GLOBALS['lang'][$scope][$item])) unset ($GLOBALS['lang'][$scope][$item]);
$GLOBALS['lang'][$scope][$item] = $str;
* Include user files prefixed by '_' from languages folders
$paths = glob('../languages/' . $language . '/_*.php');
foreach ($paths as $filename) {
_debug('Including user defined language files : '. $filename);
* IncludeLanguagesPluginfiles()
* Include plugin files from specific plugin languages folders
// we try to include the current culture
$paths = glob('../plugins/'. $plugin->getVar('name'). '/languages/' . U_L . '/*.php');
// if current culture not found, we include default language files
if(count($paths)== 0) $paths = glob('../plugins/'. $plugin->getVar('name'). '/languages/' . $plugin->getVar('default_language') . '/*.php');
foreach ($paths as $filename) {
_debug('Including <em>'. $plugin. '</em> plugin language files : '. $filename);
|