Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:47

multiligual menu


Poster: yuvallb
Dated: Thursday December 7 2006 - 13:07:18 GMT

Hi,
I want to do a multilingual menu, where the menu is displayed in english,
and whene you rollover a menu item it displayes in spanish.
Is that possible with milonic???


Poster: Ruth
Dated: Thursday December 7 2006 - 18:45:29 GMT

Hi,

Yes you can do something like that. But if you are asking if the menu on its own can be told to translate something to Spanish on mouseover, no that's not possible. Well, it's probably possible if you could write a function which had all the English words in it and designed it so that the function said, when mouseover of Hello, change text to Hola and so on for every item.

However, for what you want, it's pretty easy to do. There is a function called mm_swapText which you can use. Just as an example, your aI string would be something like this [you'd use your own text, of course]

Code:
aI("text=Welcome to my house;align=center;onfunction=mm_onText('Bienvenidos a mi casa');offfunction=mm_offText();itemwidth=200;");


There is a demo for this explaining how to set it up here

http://support.milonic.com/demos/swap_text/index.htm

Your other option would be to use tooltips, this would not change the text but instead would popup whatever tooltip you had created when the person moused over the item. So, the text would be the same but a tooltip with whatever Spanish you wanted would popup onmouseover.


To get tooltips to work you need the tooltip module from the bolt on modules page. There is also a link there to the tooltips menusample, the module is about the middle of the page.

http://www.milonic.com/menumodules.php


Poster: yuvallb
Dated: Thursday December 7 2006 - 20:37:14 GMT

thanks!
thats exactly what i was looking for!


Poster: Andy
Dated: Tuesday December 19 2006 - 12:46:05 GMT

Hi,

Just for the record here is a multi country menu that we are working on:




Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
padding=4;
separatorsize=1;
subimage="arrow.gif";
}


current_menu_country="Spanish"; // This is the current country you want to display results for - this needs to change based on the users country
menu_countries=[// List of the different countries you want to provide for "must be in the same order"
,"English"
,"French"
,"German"
,"Spanish"
,"Italian"
];


function _cValue(){ //parameter must match menu_countries[] above, for example: valueByCountry("English","French","German","Spanish","Italian");
v=arguments;var mc,ma;mc=0;ma=new Array(v);for(var a=1;a<menu_countries.length;a++)if(current_menu_country==menu_countries[a])return v[a-1];return v[0];
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
style=menuStyle;
aI("text="+_cValue("No","Non","Nein","No","No")+";url=http://www.milonic.com/;");
aI("text="+_cValue("Yes","Oui","Ja","sí","sí")+";url=http://www.milonic.com/;");
aI("text="+_cValue("Hello","Bonjour","Hallo","Hola","Ciao")+";url=http://www.milonic.com/;");
aI("text="+_cValue("Good Bye","Au revoir","Auf Wiedersehen","Adiós","Arrivederci")+";url=http://www.milonic.com/;");
aI("text="+_cValue("Link By Country","Lien Pour Le Pays","Verbindung Für Land","Acoplamiento Para El País","Collegamento Per Il Paese")+";url="+_cValue("/index.php?c=English","/index.php?c=French","/index.php?c=German","/index.php?c=Spanish","/index.php?c=Italian")+";");
}

drawMenus();




Hope this helps,
Andy