V7: Translations + placeholder variables issue

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
MClementson
Posts: 19
Joined: Fri Aug 25, 2017 11:48 am

I'm hoping someone can clarify how and when the translation features happen as I'm having an issue with using the translation features in conjunction with Javascript and the skin placeholder variables. I hope this cutdown version of what I'm trying to develop will demonstrate:

1) In the skin editor I have created a hotspot template that has a text label for the hotspot title. I've also created a text variable called var_title_copy and there's a text label that displays that value. With a mouse enter event var_title_copy is set to the hotspot title placeholder $(hs) value and then echoed to the console using console.log(pano.getVariableValue('var_title_copy'))
Pano1.jpg
Pano1.jpg (97.84 KiB) Viewed 1119 times
2) In operation, the visual label displays the translated text, but the text echoed to the console is the original English title.
English.jpg
English.jpg (78.48 KiB) Viewed 1119 times
French.jpg
French.jpg (75.98 KiB) Viewed 1119 times
3) My questions are - is this expected behaviour or a bug? and how can I send the translated text to a Javascript function?

Thanks,

Matt
MClementson
Posts: 19
Joined: Fri Aug 25, 2017 11:48 am

Here's the skin shown above
Attachments
translation_issue_skin.ggsk
(1.72 KiB) Downloaded 88 times
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Matt,

I have a feeling that the translations aren't actually written to the variable, rather the original language is translated in the skin. So when you send it to the console it's sending what's stored in the variable but not the translation.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
deedee123
Posts: 287
Joined: Wed May 20, 2020 10:38 am
Location: NL

hi,
maybe something to do with my forum post above, i think the skin seems to not have any language code until you actually change it in the skin?
best,
David
Post Reply