Changing Language - Menu and Text

  • Hi,

    I'm trying to build a menu to choose the language.

    - pop up effect on hovering over the current flag icon
    - switch position between the current and chosen flag icon
    - pop down effect on click

    Attached is a picture of the situation.

    Finally how to insert the new language interfaces?

    1- a global.xml, map.xml, list.xml, ... for each language?
    2- a language.xml for each language?
    3- or only a single language.xml with all the translations?
    4- what else?

    What about the code?

    Thanks in advance,
    Marco

  • Hi,

    In my tours, to manage different languages (de, en, es, fr), I manage different XML ressources files which load only texts attributes for buttons, hotspots, html/textfields...(but today, I'm late to translate all my html:texfields *sad* )

    http://www.jphd360.net/visites/LesOub…s.html?m.lng=fr

    http://www.jphd360.net/visites/LesOub…s.html?m.lng=en

    To try to be more efficient, I select the language directly from the user/browser properties.
    So depending of these properties, the main page
    http://www.jphd360.net/visites/LesOublis/LesOublis.html load "de", "en", "es" of "fr" texts ressources

    and if the language code is not recognized by my main XML script, I load "en" default ressources.

  • Hi,

    JP, thanks for your suggestion: it might be a solution but I'd like most the dropdown menu solution.
    Hope to find help in the forum.


    So, using the following code I was able, at least, to show and hide the menu... but it happens only one time. There must be some problem with the code.

    I also tried:

    Code
    <action name="usa-hideflag">
    	set(plugin[usa].onclick,action(usa-showflag););
    	tween(plugin[italy].alpha,0);
    	tween(plugin[germany].alpha,0);
        </action>

    or

    Code
    <action name="usa-hideflag">
    	tween(plugin[italy].alpha,0);
    	tween(plugin[germany].alpha,0);
    	set(plugin[usa].onclick,action(usa-showflag););
        </action>

    ... doesn't work either.


    Actually I'd need help on coding a general rule for such a menu so that the chosen flag will take the place of the current flag in the controlbar.
    It'd be nice also a dropdown effect on opening/closing the menu.

    I tried but don't understand the krpano code when it comes to complex actions.

    I don't know AS3 either, so I'm not sure if creating a plugin in Flash might be either easier or just possible.

    Thanks,
    Marco

  • The best solution it's 3

    all in main xml with variable *wink*

    egg

    on each showtext you put a get() like this

    Code
    onhover="showtext(get(park));

    make any actions for each language and set()

    you can call a language by onstart and after with you flag call the language you want

  • Hi,

    Job thank you very much now I have something at least partially working... I mean I can't return to english language; also, please, could someone help on coding a dropdown effect and repositioning of the flag of the chosen language in the controlbar?
    By the way, it'd be great to have a general action for a dropdown icons menu or, better yet, a plugin. *smile*

    Here's my pano:

    http://www.marcolanciani.com/Test/vr/A%20VR.html


    And here's the code, which is not fully working:


    Regards,
    Marco

  • Hi,

    maybe I've found a solution for my drop down menu, but I need still a bit of help to code the action. This is the action I need:

    Code
    set(plugin[pluginname].position);

    Where "position" is the x,y position on the controlbar as a parent.
    I think it should work. Any suggestion?
    I't's almost a week I'm on this: any help is welcome and really appreciated.

    Regards,
    Marco

  • I changed the font to "normal": it works now... but I'd prefer "italic". Any chance?

    Also I was able to change contextmenu language for my custom items (you can check the xml), but have no idea on how to change the language for "Enter Fullscreen" and "Exit Fullscreen" and other standard items like krpano and flash settings...
    Any idea?

    Thanks again for the support.
    Regards,
    Marco

  • try


    Code
    <contextmenu fullscreen="false">
    		<item name="copyright"     caption="© Marco Lanciani"                onclick="openurl(http://www.marcolanciani.com)" />
    		<item name="Normal"        caption="get(Projection View - Normal)"        onclick="action(view_normal);"             separator="true" />
    		<item name="Fisheye"       caption="get(Projection View - Fisheye)"       onclick="action(view_fisheye);"       />
    		<item name="Architectural" caption="get(Projection View - Architectural)" onclick="action(view_architectural);" />
    		<item name="Stereographic" caption="get(Projection View - Stereographic)" onclick="action(view_stereographic);" />
    		<item name="Pannini"       caption="get(Projection View - Pannini)"       onclick="action(view_pannini);"       />
    		<item name="Planet"        caption="get(Projection View - Little Planet)" onclick="action(view_littleplanet);"  />
            <item name="fullscreen"    caption="get(Enter Fullscreen)"                onclick="switch(fullscreen);"              separator="true" />
    	</contextmenu>

    and set in the action language

    I never try, but perhaps it's working *wink*

  • Hi,

    I already tried with

    caption="get()"

    It doesn't work: what I get in the actual context menu is

    get()

    By the way, have a look at the online xml: I've found a solution for my custom menu, but don't have a solution for translating Enter Fullscreen and Exit Fullcreen when changing language.

    Regards,
    Marco

  • Hi .. Are you able to update your url.. Its seems it is out of date.. I would like to see it working...

    There seems to be a few options to get a change language, but some seem not to work to well.. Or if they do they seem a bit hard to get to work.. I like the options where the language has popup tab..

    I have an option working but I am not entirely happy with it. if you hold your mouse over the menu it will change to the given language. The Desecration text also changes.., but is not alway accurate, but thats not my fault, its Google..

    http://www.destinyvirtualtours.com/PTPV2kolorFINA…ml?html5=prefer

    Are you able to share your final working option for me to play around with..

    I do not come to this forum too often since PMs seem to take forever or never answered..

    Destiny...

    Sometimes I might come across as being stupid; But I have an IQ of 137 *tongue*

  • Hi, sorry for the delay.. I don't often come to this forum..

    Its just the free Google Language widget placed in a div..

    I will try to send you the how to do it..

    Destiny..

    Sometimes I might come across as being stupid; But I have an IQ of 137 *tongue*

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!