Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Location: Mexico City
Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
![]() |
Source code |
1 |
<layer name="button1" devices="desktop".../> <layer name="button1" devices="tablet".../> |
![]() |
Source code |
1 |
width.desktop="80%" width.mobile="100%" |
![]() |
Source code |
1 |
html.en="[h1]Welcome![/h1]" html.es="[h1]¡Bienvenido![/h1]" |
![]() |
Source code |
1 |
<data name="body_text" lang="es">...</data> <data name="body_text" lang="en">...</data> |
This post has been edited 5 times, last edit by "indexofrefraction" (Feb 28th 2021, 3:07pm)
![]() |
Source code |
1 |
<data name="body_text_es">...</data> <data name="body_text_en">...</data> |
![]() |
Source code |
1 2 |
set(lang, es); get(data[calc('body_text_'+lang)].content) |
![]() |
Source code |
1 |
<data name="body_text" lang="es">...</data> <data name="body_text" lang="en">...</data> |
![]() |
Source code |
1 2 3 4 5 6 |
set(lang, en); for(set(i,0), i LT data.count, inc(i), if(data[get(i)].lang == lang, // english data ); ); |
Location: Mexico City
Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
Why? The language can be reloaded dynamically. I always do this. No need to restart the project.The downside of this method as I can see now is that to change language krpano would need to "restart" the tour/scene (with a new "language value"), though if you see most websites all over the web work just like that.
Location: Mexico City
Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
Why? The language can be reloaded dynamically. I always do this. No need to restart the project.The downside of this method as I can see now is that to change language krpano would need to "restart" the tour/scene (with a new "language value"), though if you see most websites all over the web work just like that.
Piot'
Location: Mexico City
Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
![]() |
Source code |
1 |
html.en="[h1]Welcome![/h1]" html.es="[h1]¡Bienvenido![/h1]" |
![]() |
Source code |
1 2 3 4 |
<translations name="en" title="Hello" ... /> <translations name="de" title="Hallo" ... /> ... html="get:translations[get(language)].title" |
![]() |
Source code |
1 2 3 4 |
<include url="translations_en.xml" if="language == 'en'" /> <include url="translations_de.xml" if="language == 'de'" /> ... html="get:translations.title" |
![]() |
Source code |
1 2 3 4 |
html.lang.en="Hello" html.lang.de="Hallo" url.lang.en="english.png" url.lang.de="german.png" |
This post has been edited 5 times, last edit by "indexofrefraction" (Mar 3rd 2021, 8:09am)
Location: Mexico City
Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer
![]() |
Source code |
1 2 |
html.lang.en="Hello" html.lang.de="Hallo" url.lang.en="english.png" url.lang.de="german.png" |
This post has been edited 2 times, last edit by "panomaster" (Mar 30th 2021, 8:47pm)
This post has been edited 1 times, last edit by "lerayfle" (Sep 9th 2021, 10:09am)