I think, i got a a solution for multilanguage support and hope, that i won’t forget anything.
1.
First 4 changes in
EasyEvents.class.php (look for $config - sorry, i don’t know how to highlight in code segments):
class EasyEvents {
var $modx;
var $upperDateBoundary,$lowerDateBoundary;
var $css, $qs, $misc, $templates, $lang;
var $nodes, $subParents,$subParentsList, $config;
// Debug
function EasyEvents($nodes=0, $config='en') {
global $modx;
$this->modx = &$modx;
// Initialize things
$this->nodes = $nodes;
$this->config = $config;
$this->setCustoms($this->config);
$this->setDateBoundaries($this->nodes);
// Debug
}
2.
and the second 3 changes at:
function setCustoms($config='en')
{
// Initialize empty arrays
$this->css = array();
$this->qs = array();
$this->misc = array();
$this->templates = array();
$this->lang = array();
// Get customs file
if ( file_exists($this->modx->config['base_path'].'assets/snippets/EasyEvents/easyEvents.config_'.$config.'.php') )
{
include $this->modx->config['base_path'].'assets/snippets/EasyEvents/easyEvents.config_'.$config.'.php';
}
3.
Rename your config files from easyEvents.config.php into easyEvents.config
_de.php, easyEvents.config
_en.php ...
4.
Now change your snippets EasyEvents_AJAX and EasyEvents_ListMini. Have a look for:
$g_easyEvents = new EasyEvents($nodes);
change this line in both snippets to:
$g_easyEvents = new EasyEvents($nodes,$config);
5.
You can add this new parameter to their default properties (see EasyEvents_ListMini.defaultProperties.txt):
&config=Language (de or en);string;en
6.
You still need two or more AJAX-Pages, to have a call like
[!EasyEvents_AJAX?&config=`de`!]
I’m still hoping for a "synchronMonth"-Parameter (s. Reply #115). Thank you.