Hi!
Change language by pressing the (flag):
Names panoramas, hotspots and descriptions in a separate file.
Example, text_data_en.xml:
Code
<krpano>
<language name="english">
<text name="main_title" value="City Walk" />
<text name="menu" value="Main menu" />
<text name="skin_load" value="Loading..." />
<text name="skin_sc_discr_on" value="Show description" />
<text name="skin_sc_discr_off" value="Hide" />
<text name="scene_021"
sc_title="Memorial complex “Walk of Fame”"
sc_discr="...1"
spot-00-01="" />
...
</language>
</krpano>
Display More
Displays the name of the current scene:
Code
txtadd(layer[skin_scene_title].html, get(language[get(currentlanguage)].text[main_title].value), '[br]', get(language[get(currentlanguage)].text[get(xml.scene)].sc_title) ); ,
copy(layer[skin_scene_title].html, language[get(currentlanguage)].text[get(xml.scene)].sc_title );
It works.
Name hotspot:
Code
onhover="if(skin_settings.tooltips_hotspots, if(linkedscene, showtext(get(language[get(currentlanguage)].text[get(linkedscene)].sc_title),SKIN_TOOLTIPS)) );"
It works too.
Function skin_addmapspots():
Code
...
if(skin_settings.tooltips_mapspots,
escape(spottitle,get(language[get(currentlanguage)].text[get(scene[get(i)].name)].sc_title));
txtadd(spothoverevent,'showtext(',get(spottitle),',SKIN_TOOLTIPS)'); , set(spothoverevent,null);
);
addspot(get(spotname), get(scene[get(i)].lat), get(scene[get(i)].lng), get(scene[get(i)].heading), false, get(spotclickevent), get(spothoverevent));
...
get(language[get(currentlanguage)].text[get(scene[get(i)].name)].sc_title)
Displays the name of the mapspot only on default language. Language select dont work.
As I understand it, the call skin_addmapspots(); occurs only once. By event onmapready.
I tried to call this function when changing the language:
Code
onclick="set(currentlanguage, russian); skin_addmapspots();
onclick="set(currentlanguage, english); skin_addmapspots();
It did not work Mapspot signed only on the default language.
What do I need to change the language of signatures mapspot?