Topic: Change config.xml [SOLVED]

Hi, I would like to create a second config.xml for captions in another language. Is it possible to call different config.xml’s while loading the page?

Thanks in advance for your answer!

Greetings from the canary islands ...

Uwe

Re: Change config.xml [SOLVED]

You can selectively load a specific XML file using JavaScript and the configURL option as follows:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
    var config = 'spanish.xml';

    if (language === 'english') {
        config = 'english.xml';
    }
    
    new juicebox({
        configUrl: config,
        containerId : "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "#222222"
    });
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

In the example above, you would need to define your own 'language' variable and test it to determine which XML file to use.

Re: Change config.xml [SOLVED]

Works perfectly! 1.000 tanks!!

Regards from sunny La Palma,

Uwe