Menu: different link (URL) per language?

How to support more than one language on your site.

Moderator: General Support Moderators

Forum rules
Locked
andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Menu: different link (URL) per language?

Post by andrewvanmarle » Fri Oct 26, 2007 4:32 pm

I have a menu item linking to an external site, can I have different URL's per language so the menu points to the right translatin of the external site?
Last edited by andrewvanmarle on Mon Oct 29, 2007 9:10 am, edited 1 time in total.

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

Re: Menu: different link (URL) per language?

Post by infograf768 » Sat Oct 27, 2007 6:14 am

I solved this issue by modifying the file
administrator/components/com_joomfish/contentelements/menu.xml

I have added a line which lets change the url when the menu item is translated (in red below):

For joomfish 1.8

  Menus
  A. Kempkens
  1.8
  Definition for the core menu manager
 
 
  ID
  Name
  params
  Menu Type
  Link URL
  Check out by
  Check out date
  c.published >= 0
 
 
 
    name
    menutype
    published
 
For joomfish 1.7

  Menus
  A. Kempkens
  1.7
  Definition for the core menu manager
 
 
  ID
  Name
                Link URL
  Check out by
  Check out date
  c.published >= 0
 
 
 
    name
    menutype
 
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Re: SOLVED: Menu: different link (URL) per language?

Post by andrewvanmarle » Mon Oct 29, 2007 8:59 am

wow, thanks!!!

andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Re: Menu: different link (URL) per language?

Post by andrewvanmarle » Mon Oct 29, 2007 9:11 am

I added the line of code, but I  don't see a change in the translation screen.  did I do something wrong?

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

Re: Menu: different link (URL) per language?

Post by infograf768 » Mon Oct 29, 2007 10:46 am

Don't know as I can't see.
The line adds a new part in the link-url translation page
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Re: Menu: different link (URL) per language?

Post by andrewvanmarle » Mon Oct 29, 2007 12:22 pm

hmm, ok, I added the code, correct location, and then went to joomfish>translations and chose menu's and the laguage. clicking a nemu item didn't show me an extra field.  Am I supposed to find it there?

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

Re: Menu: different link (URL) per language?

Post by infograf768 » Mon Oct 29, 2007 3:06 pm

Yep. See picture.
You do not have the required permissions to view the files attached to this post.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Re: Menu: different link (URL) per language?

Post by andrewvanmarle » Mon Oct 29, 2007 3:36 pm

hmmm, how strange!

I think I Am doing someting wrong since I turned off another type (params) and it didn't make a difference either.

andrewvanmarle
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Fri Jun 08, 2007 3:14 pm

Re: Menu: different link (URL) per language?

Post by andrewvanmarle » Mon Oct 29, 2007 3:43 pm

ok, it gets stranger and stranger, since I tried to make joomfish react to anything, so I changed the screen name of and that did nothing. is there a cache?

g0nz0
Joomla! Intern
Joomla! Intern
Posts: 58
Joined: Sun Sep 11, 2005 8:51 pm

Re: Menu: different link (URL) per language?

Post by g0nz0 » Thu Jan 10, 2008 6:38 pm

your workaround for JoomFish 1.7 works perfectly for me, thanks a lot!

:D

dzhao
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Wed Jan 10, 2007 1:12 pm

Re: Menu: different link (URL) per language?

Post by dzhao » Tue Mar 18, 2008 2:12 pm

:( Dear,

I have one smae problem?

I do't know what exactly I should write in XML file

<field type="titletext" name="name" translate="1">Link URL</field>

Correct?

Thanks

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

Re: Menu: different link (URL) per language?

Post by infograf768 » Tue Mar 18, 2008 3:42 pm

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>
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

dzhao
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Wed Jan 10, 2007 1:12 pm

Re: Menu: different link (URL) per language?

Post by dzhao » Tue Mar 18, 2008 3:59 pm

Dear,

I am using 1.7, also I copy

<field type="text" name="link" translate="1">Link URL</field>

only, and it is working well.

Many thanks

Dong

kebdana
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Jul 07, 2007 2:45 pm

Re: Menu: different link (URL) per language?

Post by kebdana » Sun Mar 23, 2008 8:46 pm

Hello,
I had the same problem, I solved it with the new xml file (thanks),
But I've got an other problem the field where I've to translate my link is too small compare to my long link.
Is there a solution to that?
many thanks all...

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

Re: Menu: different link (URL) per language?

Post by Kampp » Wed May 14, 2008 10:16 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 ... u#p1226648
https://toolmaster.dk - Danish Joomla Services
https://joomla-hosting.dk - Danish Joomla hosting
https://joomla-konsulent.dk - Danish Joomla Services

Rocco
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Tue Feb 07, 2006 10:38 am

Re: Menu: different link (URL) per language?

Post by Rocco » Mon May 19, 2008 8:02 am

It works but long url's can't be inserted at the field , can that be changed?

User avatar
brunoazevedo
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Sun Dec 17, 2006 11:13 am

Re: Menu: different link (URL) per language?

Post by brunoazevedo » Thu Feb 19, 2009 11:29 am

HI Rocco,

In menu.xml, try to insert

maxlength="300"

like:
<field type="text" name="link" maxlength="300" translate="1">Link URL</field>

Working to me. :pop

I Now this answer is to late, but can help someone.

Thanks!

User avatar
akede
Joomla! Ace
Joomla! Ace
Posts: 1258
Joined: Fri Aug 12, 2005 6:15 am
Location: Munich, Germany
Contact:

Re: Menu: different link (URL) per language?

Post by akede » Thu Feb 19, 2009 12:42 pm

Hi,

Are you testing the long URL's on 2.0 or 1.8?

Alex
Joom!Fish 2.0 your free multilingual solution for Joomla! 1.5 i - http://www.joomfish.net - follow us on twitter @joomfish
Meet us at J and Beyond, 30.05 - 1.06.10, Wiesbaden, Germany - http://jandbeyond.org

User avatar
brunoazevedo
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Sun Dec 17, 2006 11:13 am

Re: Menu: different link (URL) per language?

Post by brunoazevedo » Thu Feb 19, 2009 2:33 pm

Hi Alex,

I tested with Version 1.8.2. ( Joomla 1.0.15 )

In the Version V2.0.2 (Joomla 1.5.9), work, but it need some change in the menu.xml element:

You need change in line 13:

<field type="readonlytext" name="link" maxlength="300" translate="1" posthandler="saveUrlParams">Link</field>

TO:
<field type="text" name="link" maxlength="300" translate="1" posthandler="saveUrlParams">Link</field>

Summary:
Change the type="readonlytext" to type="text"

NOTE: I'm not a PHP expert, so i can't explain why this are read only.


Bruno

User avatar
akede
Joomla! Ace
Joomla! Ace
Posts: 1258
Joined: Fri Aug 12, 2005 6:15 am
Location: Munich, Germany
Contact:

Re: Menu: different link (URL) per language?

Post by akede » Fri Feb 20, 2009 11:45 am

Hi Bruno,

I'm very happy to see that you as non PHP expert figured out these changes. Honest this says for me that the decision of using a XML file instead of other configurations is the right one.

Yes your changes work right. There is a feedback idea (http://feedback.joomfish.net/pages/gene ... and-simple) that goes into your direction as well. The reason why this is related is that the link in the menu normally is generated automatically. If you translate it manually this can cause problems with the translations if you change the original.

I hope this helps everybody.

Alex
Joom!Fish 2.0 your free multilingual solution for Joomla! 1.5 i - http://www.joomfish.net - follow us on twitter @joomfish
Meet us at J and Beyond, 30.05 - 1.06.10, Wiesbaden, Germany - http://jandbeyond.org


Locked

Return to “Joom!Fish and Multilingual Sites”