I'm based in Switzerland and here multi-language is a key for successfull websites. Since 2 years I'm working with DNN and slowly I begin to really understand.
Basically I'm using the apollo-software modules to enhance the multi-langauge capabilities of DNN. For the last multi-language site I had to realize, I searched an easy approach to use core modules like documents. I found one with a following javascript in a customized skin for the related website:
<script type="text/javascript">
/*
var mylang = document.getElementsByTagName("html")[0].lang;
if(document.getElementById("dnn_ctr396_ContentPane")){
var contentDE = document.getElementById("dnn_ctr396_ContentPane");
}
if(document.getElementById("dnn_ctr398_ContentPane")){
var contentFR = document.getElementById("dnn_ctr398_ContentPane");
}
if (mylang == "fr-CH") {
if(document.all) {
contentDE.parentElement.parentElement.parentElement.innerText = "<tr><td></td></tr>";
}
else{
contentDE.style.display = "none";
contentDE.parentElement.style.display = "none";
contentDE.parentElement.parentElement.style.display = "none";
contentDE.parentElement.parentElement.parentElement.style.display = "none";
}
}
else{
if(document.all) {
contentFR.parentElement.parentElement.parentElement.innerText = "<tr><td></td></tr>";
}
else{
contentFR.style.display = "none";
contentFR.parentElement.style.display = "none";
contentFR.parentElement.parentElement.style.display = "none";
contentFR.parentElement.parentElement.parentElement.style.display = "none";
}
}
*/
</script>
In this sample I work with 2 document modules on the same site, one for the german the other one for the french content. With the javascript I hide the inactive document module. In IE it's working fine, but in FF I've no action, I tried different way's but no one is working.
Does somebody know what I'm doing wrong?
You can see it live at: http://www.sakret.ch/Home/Datenblätter/tabid/56/language/de-CH/Default.aspx
Thank you