It works¡¡¡¡
Difficulties in achieving the translation of different elements to layers
-
-
Testing it more rigorously, if by mistake I click on English, and that is the language that is being displayed at that moment, the callot disappears, and only reappears if the opposite language button is clicked
-
- Official Post
I could update the plugin with the new linking system, but then it won't work with previous versions of krpano.
Hi, it should be possible to made the plugin compatible to both versions.
E.g. here how such code could look - first a check for the version and then either linking or coping the content:
Codeif(parsefloat(version) GE 1.22, link(callout.text, caller.content); , copy(callout.text, caller.content); );
When linked, the 'callout.text' will automatically get updated when 'caller.content' changes.
Best regards,
Klaus -
Thanks Klaus , works great but I need to resize the callouts when language has changed, is there a onlanguagechanged event ?
-
Hi,
Perhaps this:
krpano.com - Plugins - Textfield
Or:krpano.com - Documentation - Actions / Scripting Reference
.. is of any help in this particular case?Tuur
-
- Official Post
is there a onlanguagechanged event
There is no event, but you could e.g. do:
-
Thanks Klaus,
works perfect now : https://www.360images.fr/callout/ramirox3 you can download the update from the plugin page : https://krpano.com/plugins/userplugins/callouthotspots/#top
-
Great¡¡¡¡ Thanks Klaus and jeromebg
-
It works wonderfully well, before the callout was slightly hidden while the translation was being done, now only the text is changed, the callout remains still. I updated the link
-
Hi Klaus
Using the translation in a scrollbar layer, everything works perfectly.
" <layer name="infoSite_text" enabled="true" type="text" bg="false" bgalpha="1.0" bgcolor="0xffffff" textalign="left" padding="50 70 20 80" bgroundedge="0" css="font-family: univers condensed; font-weight:light; font-size:32px; color: #797474;" txtshadow="" template="[div style='font-family: univers condensed; font-weight:bold; color: #797474;font-size:28px;line-height:32px;text-decoration: underline; ']{{translate(nombre)}}[/div][div style='font-family: univers condensed; font-weight: regular; color: #797474;font-size:19px;line-height:20px;text-decoration: underline; '][br]{{translate(aboutquestion)}}[/div]
[div style='font-family: univers condensed; font-weight: light; color: #797474;font-size:18px;line-height:16px;'][br][br]{{translate(corpus)}}[/div]"
/>"
But I try to translate the texts of a popup, texts that are supplied through:
<data name="data_html_example_english"><![CDATA[......, I have not been able to implement the translation. Could you provide me with a clue on how to proceed with this element? -
Hi,
I use this here,when i understand you right:
test
You could check/study the tour.xml and see if it helps you.I hope so,
Tuur
-
Thanks Tuur, your example is very clear and useful. In your case you are launching from the layer textbox which contains the templates: template="{{translate(t1)}} {{id:toupper(id)}} ,[br][br] {{translate(t2)} } [br][br] {{tt3}}[br]Tuur"
In the case of the popup, which is opened through hotspot or a layer,
When you click, the popup opens showing the text found in a cdata. I really can't find where to put:
template="{{translate(popup_tc)}}"
In languages, I have it like this:
<languages name="es" popup_tc="get:data[centrenamiento_es].content"
<languages name="en" popup_tc="get:data[centering_en].content" -
- New
- Official Post
What popup?
How does it work?
E.g. how and where does it gets its text? -
Hi Klaus
The popup works like the example krpano has.
Using the popup action that is hosted in a file called acciones.xml, and the text is in another file called data.xml, there they are:
<data name="centrenamiento_es" >
<data name="centrenamiento_en" >
The link, when opened, shows two buttons at the bottom right,
one opens a layer scrollbar that, with that I have no problem, I get the translation, the other opens the popup, which I have not been able to get it to change the language -
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!