Page 1 of 1

choose project language via URL

Posted: Thu Apr 16, 2020 11:06 pm
by dizzz
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

Re: choose project language via URL

Posted: Sat Apr 18, 2020 10:41 pm
by Hopki
Hi,
Pano2VR has a logic block that can detect Host.
So depending on Host you can then select the default language.
Regards,

Re: choose project language via URL

Posted: Sun Apr 19, 2020 7:40 pm
by dizzz
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

Re: choose project language via URL

Posted: Tue Apr 21, 2020 12:01 pm
by dizzz
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