I started project for local municipality and created virtual tour. We also recorded voice audio for separate panoramas or groups in two languages – Latvian and English. I made also in two languages (tooltips) which works fine, but my problem is how to add separate audio files for english tour version. I’m absolute newbie in programming languages, but can make some changes in code.
Is there any ability to change audio to english version files when user changes tour language? Can it be done via index.xml and does anyone have some code which I can add somewhere?
You can do like this, open index.xml in code editor like notepad++, atom. Find (CTR+F) backgroundsound. It’ll find one by one code like this
change this to
Now if tour_language is lv it’ll get limbazi_lv_14.mp3 if en it’ll get limbazi_en_14.mp3
Also, there is preloadSounds action in the index_skin.xml open it and find this action. There you have this code
change it to
I didn’t test this, but seems should work for initial language, if the tour starts with ‘en’ language sounds will be ‘en’.
But for dynamic change when sound is playing and the user changes the language it might not work. There needs more code to update the sound.