Right! This way it can't work. I should think about this. But now (sleeping well this night) I woke up with another solution.
I changed the line in cms.php:
Code: Select all
$pth['folder']['template'] = $pth['folder']['templates'].$cf['site']['template'].'/';
to
Code: Select all
$pth['folder']['template'] = $pth['folder']['templates'].$cf['site']['template'].'_'.$sl.'/';
Now the only I need are templates named e.g.:
[templates]
/[default_sk]
/[default_de]
/[default_en]
/[default_nl] etc.
No other changes and adjustments are needed. The var. in config.php also remains as it was:
Code: Select all
$cf['site']['template']="default";
The same way would it be possible to change the line:
Code: Select all
$pth['file']['template'] = $pth['folder']['template'].'template.htm';
to
Code: Select all
$pth['file']['template'] = $pth['folder']['template'].'template_'.$sl.'.htm';
instead of the previous way and have only:
[templates]
/[default]
//template_sk.htm
//template_de.htm
//template_en.htm
//template_nl.htm etc.
It seems to work well for me. Or is there something wrong with it?
To do: insert a checking if additional language templates exist - if not use the some default template. Maybe today