[SOLVED] Joomfish language change

Tabs Joomla module is the easiest way to create and manage your content via tabs.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Nov 09, 2011 7:41 pm
Hi all,

I recently provided a solution to allow the change of the logo with the joomfish language selector. My template, based on the corporate 2 template is coming along rather nicely, however, I have only just today realized that there is also no option to change the language on the tabs manager.

I am assuming there are as yet no solutions, I have searched the forum and found nothing but I was hoping someone could at least point me in a rough direction?

My idea is to set up a new tabs group containing my translated tab headings etc... But how would I switch it relative to the language? The code itself isn't an issue for me but where would I write it? which file?

Any help would be amazing,

Thank you
User avatar
Senior Boarder

GK User
Wed Nov 09, 2011 9:46 pm
My solution in the end was as follows:

The best I could come up with was two module positions in the exact same place, one that only appeared when my language was english and one that only appeared when my language was french...

I had already created a position for my tabs called 'custom1'. So from the start, I added a new module position to 'templatedetails.xml' called 'custom1_fr'. Then in 'header.php' I cloned my 'custom1' section and pasted it directly below, being sure to make the necessary name changes to suit my new position. As below:

Code: Select all
<?php if($this->countModules('custom1')) : ?>
<div id="custom1" class="custom_inline">
<jdoc:include type="modules" name="custom1" style="gavickpro" />
</div>
<?php endif; ?>

<?php if($this->countModules('custom1_fr')) : ?>
<div id="custom1_fr" class="custom_inline">
<jdoc:include type="modules" name="custom1_fr" style="gavickpro" />
</div>
<?php endif; ?>


This gave me the two positions, so to make them only show for a specific language I added to the text as follows:

Code: Select all
<?php if($this->countModules('custom1') && $this->language == "en-gb") : ?>
<div id="custom1" class="custom_inline">
<jdoc:include type="modules" name="custom1" style="gavickpro" />
</div>
<?php endif; ?>

<?php if($this->countModules('custom1_fr') && $this->language == "fr-fr") : ?>
<div id="custom1_fr" class="custom_inline">
<jdoc:include type="modules" name="custom1_fr" style="gavickpro" />
</div>
<?php endif; ?>


Next I added the new div id to my template.css by simply copying the 'custom1' id and renaming to 'custom1_fr'

After this all that was really left to do was create another tab group with my french titles/content etc, copy the tabs module and reassign its tab group to the french group and assign it to the 'custom1_fr' position.

So far that has solved the problem.

Once again I hope this can be of help to someone.
User avatar
Senior Boarder

GK User
Wed Nov 09, 2011 10:48 pm
Thank you for your solution but you could of just use Advanced Module Manager to do this.

See more information:
Code: Select all
http://www.nonumber.nl/extensions/advancedmodulemanager

You can show modules depending on selected language and more.
If that's not enough you can specify your own php conditions to whether display the modules or not.

See you around.
User avatar
Platinum Boarder

GK User
Thu Nov 10, 2011 2:39 pm
Ah yes I can see how that would be a good option... I get carried away with playing with code and completely forget about extensions... :silly:

Thanks Norman, I shall be sure to keep it in mind for future sites.
User avatar
Senior Boarder

GK User
Fri Nov 11, 2011 11:38 am
Yes happens to all of us :D
User avatar
Platinum Boarder


cron