Language switch, again...
When the user hovers over the map hotspots, the scene name shall show up according to the chosen language. I thought this would be a simple task and tried the following:
- Create a list of variables with the names consisting of the language setting and spot number and the value being the descriptive text
- Create an action which generates the 'onhover="showtext(spotnamedescription_03,smalltext);" 'parameter
But I don't seem to have a proper understanding of how the variables work. Can anybody help to get that right?
Code
set(mp_gb_01,this is the english description of spot 1);
set(mp_gb_02, this is the english description of spot 2);
(...)
set(mp_d_01, Dies ist der deutsche Mapspot-Titel 1);
set(mp_d_02, Dies ist der deutsche Mapspot-Titel 2);
<action name="a_setmpointname">
trace(mp_gb_01); # already this part only gives me a "mp_gb_01"
result. So obviously I am doing something wrong with defining the
variables, don't I?
trace(%1); # gives me 01 as desired
trace(v_lang); # gives me the language value (e.g. "gb") as disired
copy(v_content, mp_(get(v_lang)_%1) );
trace(v_content);
set(plugin[mp_%1].onhover,showtext(get(v_content),smalltext));
</action>
<plugin name="mp_01"
url="../icons/mapspot-2.gif"
keep="true"
alpha="1"
parent="floorplan"
align="lefttop"
edge="center"
x="175"
y="192"
zorder="2"
onhover="a_setmpointname(01);"
onclick="loadscene(scene_01, null, MERGE, BLEND(1));"/>
<plugin name="mp_02" etc
Alles anzeigen
So where is my error?
Any help very much appreciated, thank you
Michael