Hello People need your advice
4image has a quite sistem of switching between langages it is possible to use it on a custom template?
for examle i ve created a new template "about me"
http://www.mysite.com/home/index.php?template=aboutme
lets say the info is in english and also translated in several langages
about_en.inc -info in english
about_de.inc -info in deutsch
about_jp.inc -info in japaneese
thats what i've put in the body this only when the template is set in english by default
<?
if ($template== aboutme) { include "{template_url}/incl/about_en.inc"; }
elseif ($l== english) { include "{template_url}/incl/about_en.inc"; }
elseif ($l== deutsch) { include "{template_url}/incl/about_de.inc"; }
elseif ($l== japanese) { include "{template_url}/incl/about_jp.inc"; }
?>
i ve added javascript that will switch the langages
function go1(){
if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "none") {
location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
}
}
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
document.write('<form name="selecter1"><select name="select1" size=1>');
document.write('<option value=none>Select your language');
document.write('<option value=none>--------------------');
document.write('<option value="{current_address}?l=deutsch">deutsch');
document.write('<option value="{current_address}?l=english">english');
document.write('</select>');
document.write('<input type="button" value="Go" onclick="go1()">');
document.write('</form>');
but it always turns me to an index.php?l=(chousen language)
..i am not sure if this correct thou {current_address}?l=deutsch
What i want is when i link on the page ?template=aboutme i se my text in english ,when i select deutsch it will ad variable $l ==deutsch so that script will include a deutsch text ito my template.
Or maybe it is easyer to add more varibls to a language files for eq enlish
$lang['about_en'] = "text here";
and then put it on the template? somehow ... {lang_about_en}??
Any Advices are welcome
Thanks