require_once("include/core.inc.php");
+function i18n($_index) { global $philter; echo $philter->i18n($_index); }
+
/** Philter base configuration class
* This is the base class of Philter.
*/
* @returns the string or false
*/
function i18n($_index) {
- if(isset($this->confg[$_index]))
- return $this->confg[$_index];
+ if(isset($this->config['i18n'][$_index]))
+ return $this->config['i18n'][$_index];
return false;
}
--- /dev/null
+<?php
+/********************************************************************************
+* include/core.inc.php : The include file for using Philter Core
+* --------------------
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+$philter->config['i18n'] = Array(
+// index.php
+ 'up' => 'Up',
+ 'dn' => 'Down',
+ 'del' => 'Delete',
+ 'submit' => 'Submit',
+
+ 'new_action' => 'New Action',
+ 'new_match' => 'New Match',
+
+ 'global_title' => 'Global configuration',
+
+ 'pool_title' => 'Redirection addresses Pool',
+
+ 'filter_title' => 'Individuals Rules',
+ 'filter_list_title' => 'Filter List',
+ 'new_rule' => '[ new rule ]',
+
+ 'filter_rule_conf' => 'Global Options',
+ 'all_matches' => 'each match must be true',
+ 'one_match' => 'only one match need to be true',
+ 'blocking_rule' => 'stop after this rule if matched',
+
+ 'filter_matches_list' => 'Matches List',
+ 'filter_actions_list' => 'Actions List',
+
+// include/email.php
+ 'your_email' => 'your email ...',
+ 'email' => 'Email',
+ 'active' => 'Active',
+ 'apply_changes' => 'Apply Changes',
+ 'add' => 'Add'
+);
+
+$handle = opendir('locales/plugins');
+while(($file = readdir($handle)) !== false)
+ if(preg_match("/^.*\.en\.inc\.php$/",$file))
+ require_once('include/plugins/'.$file);
+closedir($handle);
+
+// PHP 4.3.0 required !!!
+// foreach(glob("include/plugins/*.en.inc.php") as $file) require_once($file);
+
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>