I have made a multilanguage website alike this:
template index.php:
Code: Select all
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$string = $_SERVER['REDIRECT_URL'];
if(strpos($string, 'Russian') || $string == '/RU.html'){
include('ru.php');
} elseif(strpos($string, 'English') || $string == '/EN.html') {
include('en.php');
} elseif(strpos($string, 'German') || $string == '/DE.html') {
include('de.php');
etc... many other languages .....
} else {
include('nl.php');
}
?>
could do with "jos_change_template=" in a url... but opensef wich I use does not automaticly add that to every url correctly, so instead I use this to change my template, wich always works, also when a page is loaded first wich does not include any jos_change_template in the url.
perhaps this could help you aswell...
when the url in question is loaded... then display your other template...
could make a different template for every page if you want to...
my index basicly does nothing other then including the right language template file.
every other thing is set in the included files...