Page 1 of 1

Description in two different languages

PostPosted: Sat Sep 20, 2014 4:52 pm
by Krisztina Imre
Any ideas? I need to make a virtual tour, where the descriptions are in two languages. (first a simple html with flags that links to appropriate tour) Can I make this without to make two separate virtual tour?

Re: Description in two different languages  [SOLVED]

PostPosted: Mon Sep 22, 2014 10:25 am
by benji33
Add into yourtour_messages_en.xml file the new tags (copy all tags, rename them and translate them) for the other language.

For instance
Code: Select all
<data name="en_panotourmapsmap_title">Map</data>
<data name="nl_panotourmapsmap_title">Kaart</data>


Then add a toggle button plugin with a default action to apply later a select language code.

On this new button into yourtour_skin.xml file apply this code on the togglebuttonOnClick action where togglebutton is the name of the button :
<action name="togglebuttonOnClick">
if (state,
set(state, false);setDutch();
set(url,%FIRSTXML%/graphics/togglebutton/english_flag.jpg);
,
set(state, true);setEnglish();
set(url,%FIRSTXML%/graphics/togglebutton/dutch_flag.jpg);
);
</action>

Then add these 2 actions into the xml :
<action name="setDutch">set(tour_language, nl);</action>
<action name="setEnglish">set(tour_language, en);</action>

On next refresh of the description plugin, the description will be updated.

At this time there is no way to refresh the data already displayed.

Re: Description in two different languages

PostPosted: Tue Sep 23, 2014 5:35 pm
by Krisztina Imre
benji33 wrote:Add into yourtour_messages_en.xml file the new tags (copy all tags, rename them and translate them) for the other language.

For instance
Code: Select all
<data name="en_panotourmapsmap_title">Map</data>
<data name="nl_panotourmapsmap_title">Kaart</data>


Thanks, I will try this! :)

Re: Description in two different languages

PostPosted: Tue Sep 23, 2014 8:39 pm
by thomash
benji33 wrote:Add into yourtour_messages_en.xml file the new tags (copy all tags, rename them and translate them) for the other language...
On next refresh of the description plugin, the description will be updated. At this time there is no way to refresh the data already displayed.

Do you have an example tour of multiple languages that I could check out?
Could you please explain "refresh" and how this affects the switch in languages?
Do the onClick actions instantly change the sidebar pano titles/thumbnail captions?
Thanks

Re: Description in two different languages

PostPosted: Tue Sep 23, 2014 8:43 pm
by thomash
Also, is it possible to play different Livepano videos in different languages depending on the language flag?

Re: Description in two different languages

PostPosted: Wed Sep 24, 2014 8:12 am
by benji33
No at this time the refresh is not done on most of the HTML5 components and on some plugins.
Need to change the active panorama to refresh.

Not yet for videos.

Language support is a trick not a full functionnality at this time.

Re: Description in two different languages

PostPosted: Wed Sep 24, 2014 10:49 am
by thomash

Re: Description in two different languages

PostPosted: Wed Sep 24, 2014 12:28 pm
by benji33
Yes their make great tours.
It's a full HTML5/JS interface over a krpano engine.
So the language refresh is binded on JS "plugins".

Panotour will do the same on a refresh event once language will be fully implemented. It's not the case at this time.