Home Documentation How to How to use language dependent menu items / menus?
How to use language dependent menu items / menus? PDF Print E-mail
Written by Alex   
Monday, 23 April 2007 10:08

The basic thing behind this issue has nothing to do with the Joom!Fish in special. However this topic is of course connected. There are some basic things you need to understand prior some solutions can be explained.

Technical / Organizational background of the Joom!Fish

The translation engine of the Joom!Fish provides an effectiv and generic way of translating everything in your database. This means on the other side that this engine does not know about logical structures or relationships within you trables.

If you show a list, e.g. of menu items, and technically you select the rows of your table. The number of rows will not be changed by the Joom!Fish. Meaning independ if there is a translation available or not all menu items you are allowed to see will be shown.

Even more, as the menu items do not have any idea of how many content items resist behind their links, there is no change for the Menu or Joom!Fish to remove menu links with a section/category that is not providing content.

If you look at the content lists it's getting more logical. If you browse a section you see a list of categories including a number of items which are available in this category. This number is generate by a select count to the content table. This select count does not provide any information the Joom!Fish could use to check if this number is valid or not as the result is just a number. So if the Joom!Fish would later show less items than the count provides it would mess up everything in your site.

So what's a solution?

The most simple solution is a "language aware menu module".

The trick is simple but effective. If you provide your system with more than one menu (Administrator -> Menu -> Menu Manager) such as:

  • mainmenu
  • mainmenu_en
  • mainmenu_fr

....

Then you could enhance your menu module in the way that it is using the language depended menu instead of the normal one. In our case the mainmenu would refer to the default site language (e.g. German). The other menu's would refer to language depended menus.

As the linking of menu's to sections, categories ... results in different ItemID's you can even organize different set of templates, modules and other extentions within the language depended part's of your site.

Ok this solution is not an automatic one, but it gives you a lot of flexiblity and possibilities.

One example

We have implemented a multilingual aware mod_mainmenu for Joomla! 1.0.x. You can download it in our addons section.

Controling module positions based on the language

A second example of using this technique is the control over the module positions: http://forum.joomla.org/index.php/topic,62236.msg329684.html#msg329684
 

0 Comments

Add Comment


    Selected Contributors

    From the Joom!Fish Core team (Alex, Geraint, Ivo & Robin) a big thank you to all the people of the JoomFish community!
    Special thank's for testing, good suggestions, translations and forum moderation to:

    • Tommy White for the cute logo design
    • Bernhard, Michael, Luc, Olivier, Robin, Rune, Akarawuth
    • Harri <aka tassu> for moderation

    Ads by Google