How to load Menu Link depending of the language selected?

How to support more than one language on your site.

Moderator: General Support Moderators

Locked
JoomlaKing
Joomla! Intern
Joomla! Intern
Posts: 78
Joined: Tue Jun 13, 2006 8:24 pm

How to load Menu Link depending of the language selected?

Post by JoomlaKing » Wed Oct 10, 2007 10:31 am

Hello,

One interesting question. In main menu, on one button I have 'Link - Url' type. I want that particular menu item shall redirect to different URL:s depending on chosen language.

Are there some smart-fixs for that?

Regards.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18866
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to load Menu Link depending of the language selected?

Post by infograf768 » Thu Oct 11, 2007 3:58 am

I have been trying to add the field in the menu.xml without much success.
It displays the link in use but does not present a way to change it.

  Menus
  A. Kempkens
  1.8
  Definition for the core menu manager
 
 
  ID
  Name
  params
  Link
  Menu Type
  Check out by
  Check out date
  c.published >= 0
 
 
 
    name
    menutype
    published
 
Any idea, Alex or Ivo?
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

JoomlaKing
Joomla! Intern
Joomla! Intern
Posts: 78
Joined: Tue Jun 13, 2006 8:24 pm

Re: How to load Menu Link depending of the language selected?

Post by JoomlaKing » Thu Oct 11, 2007 11:09 am

The problem is that it is not possible to translate that part in JoomFish translation panel because ti doesn't appear as module or similar. Therefore we need some creative solution for this...

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18866
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to load Menu Link depending of the language selected?

Post by infograf768 » Thu Oct 11, 2007 12:05 pm

There is always the solution of the Mod Mainmenu - Multilanguage
http://www.joomfish.net/downloads/

slightly more complicated but not much.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

JoomlaKing
Joomla! Intern
Joomla! Intern
Posts: 78
Joined: Tue Jun 13, 2006 8:24 pm

Re: How to load Menu Link depending of the language selected?

Post by JoomlaKing » Thu Oct 11, 2007 8:29 pm

Well why not :-)

But will that solution do it harder to do a proper SEO for that site? What shall robots follow? Confusing with several menus...

?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18866
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to load Menu Link depending of the language selected?

Post by infograf768 » Mon Oct 15, 2007 9:13 am

There was an error in my code.
use (thanks Alex)

  Menus
  A. Kempkens
  1.8
  Definition for the core menu manager
 
   
        ID
        Name
        params
        Link
        Menu Type
        Check out by
        Check out date
        c.published >= 0
   
 
 
      name
      menutype
      published
 
Works here...  :)
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18866
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to load Menu Link depending of the language selected?

Post by infograf768 » Wed Mar 05, 2008 6:26 am

<?xml version="1.0" encoding="iso-8859-1"?>
<joomfish type="contentelement">
<name>Menus</name>
<author>A. Kempkens</author>
<version>1.8</version>
<description>Definition for the core menu manager</description>
<reference>
<table name="menu">
<field type="referenceid" name="id" translate="0">ID</field>
<field type="titletext" name="name" translate="1">Name</field>
<field type="params" name="params" translate="1">params</field>
<field type="text" name="type" translate="0">Menu Type</field>
<field type="text" name="link" translate="1">Link URL</field>
<field type="checked_out_by" name="checked_out" translate="0">Check out by</field>
<field type="checked_out_date" name="checked_out_time" translate="0">Check out date</field>
<filter>c.published >= 0</filter>
</table>
</reference>
<translationfilters>
<keyword>name</keyword>
<menutype>menutype</menutype>
<published>published</published>
</translationfilters>
</joomfish>
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 563
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: How to load Menu Link depending of the language selected?

Post by Kampp » Wed May 14, 2008 10:17 am

I was told in Joomfish forum that this would not work. Does it work - is it that simple?
Do we know if this fix workes for Joomfish 2.0 and Joomla 1.5?

Related thread: http://forum.joomla.org/viewtopic.php?f ... 8#p1297318
http://www.toolmaster.dk - Danish Joomla Services!

marcusjubei
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Nov 27, 2007 2:53 pm

Re: How to load Menu Link depending of the language selected?

Post by marcusjubei » Fri Jun 06, 2008 3:47 pm

hi, i have change the file menu.xml and i have uploaded with ftp, but would not work.
Why? my menu.xml is

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<joomfish type="contentelement">
  <name>Menus</name>
  <author>A. Kempkens</author>
  <version>1.8</version>
  <description>Definition for the core menu manager</description>
  <reference>
     <table name="menu">
        <field type="referenceid" name="id" translate="0">ID</field>
        <field type="titletext" name="name" translate="1">Name</field>
        <field type="params" name="params" translate="1">params</field>
        <field type="text" name="type" translate="0">Menu Type</field>
        <field type="text" name="link" translate="1">Link URL</field>
        <field type="checked_out_by" name="checked_out" translate="0">Check out by</field>
        <field type="checked_out_date" name="checked_out_time" translate="0">Check out date</field>
        <filter>c.published >= 0</filter>
     </table>
  </reference>
  <translationfilters>
       <keyword>name</keyword>
       <menutype>menutype</menutype>
       <published>published</published>
  </translationfilters>
</joomfish>


Locked

Return to “Joom!Fish and Multilingual Sites”