I got some problem with a module belonging to the Joomlart Rochea template and the technique described here.
What I have done is the following...:
I included this among the global variables in the template...
And then changed the index.php code as follows...
Code: Select all
<?php
$spotlight = array ('user1_en','user2_en','user5_en','user1_se','user2_se','user5_se');
$topspl = calSpotlight ($spotlight);
if( $topspl ) {
?>
<!-- BEGIN: TOP SPOTLIGHT -->
<div id="ja-topslwrap">
<div id="ja-topsl" class="clearfix">
<?php if ($mosConfig_lang== english ){ // Only load user1_en if language is english.
if( mosCountModules('user1_en') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user1_en']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user1_en', -2); ?>
</div>
<?php }} ?>
<?php if ($mosConfig_lang== english ){ // Only load user2_en if language is english.
if( mosCountModules('user2_en') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user2_en']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user2_en', -2); ?>
</div>
<?php }} ?>
<?php if ($mosConfig_lang== english ){ // Only load user5_en if language is english.
if( mosCountModules('user5_en') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user5_en']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user5_en', -2); ?>
</div>
<?php }} ?>
<?php if ($mosConfig_lang== swedish ){ // Only load user1_se if language is swedish.
if( mosCountModules('user1_se') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user1_se']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user1_se', -2); ?>
</div>
<?php }} ?>
<?php if ($mosConfig_lang== swedish ){ // Only load user2_se if language is swedish.
if( mosCountModules('user2_se') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user2_se']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user2_se', -2); ?>
</div>
<?php }} ?>
<?php if ($mosConfig_lang== swedish ){ // Only load user5_se if language is swedish.
if( mosCountModules('user5_se') ) {?>
<div class="ja-box<?php echo $topspl['modules']['user5_se']; ?>" style="width: <?php echo $topspl['width']; ?>;">
<?php mosLoadModules('user5_se', -2); ?>
</div>
<?php }} ?>
</div>
<div class="sep"></div>
</div>
<!-- END: TOP SPOTLIGHT -->
I then put up some new modulepossitions in the backend and made some copies of the modules to use one for an English translation and one set for a Swedish translation.
The English ones show up as they should on my English frontend. When activating the ones that should be used if the language is Swedish messes things up a bit. First they don't show up at my Swedish frontpage and I will also get an empty space big as the modules that are showed on my English frontpage for each of the same module I assign to my Swedish frontpage.
Anyone got any usefull suggestions on how to get this to work? I am not sure that I have put things right in the PHP code...
Any tips and suggestions would be appreciated and excuse my bad English.