choose project language via URL

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
dizzz
Posts: 33
Joined: Mon Mar 11, 2019 3:36 pm

Hi, I have created a project with GR/ENG versions by using a custom text variable named "language".
Project is working as expected, but I want to be able to access a specific language by URL, (something like test.html?language=gr)
so I don't have to output two times the project to embed on corresponding hosting sites. I 've read that maybe this is done by javascript (define the variable value by URL) but my knowledge stops here. Any help appreciated!

thank you
Dizzz
User avatar
Hopki
Gnome
Posts: 13015
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Pano2VR has a logic block that can detect Host.
So depending on Host you can then select the default language.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
dizzz
Posts: 33
Joined: Mon Mar 11, 2019 3:36 pm

Hi,

I was expecting something like the example url above (something like test.html?language=gr),
when final project will be delivered, I will not know the exact host name,
I ve tried with the host logic block, but it seems like it detects only the site name, not an included file name or an attribute
Maybe I m not doing something right?

thanks in advance
Dizzz
dizzz
Posts: 33
Joined: Mon Mar 11, 2019 3:36 pm

the only partial workaround i ve found is by adding the command pano.setVariableValue to the final html, so I can deliver multiple html files according to the preferred start language.
It's not an ideal solution but it saves me from outputting and uploading multiple times the whole project,
any other suggestions??

thanx
Dizzz
Post Reply