Topic: Localization: Title and caption

I am considering to buy a Juicebox Pro licence, but I am having an issue, for which I can't find a solution in the documentation, neither using the gallery editor, nor using or extending the provided Javascript API:

Is it possible to provide image titles and captions in multiple languages and have Juicebox showing the correct values depending on the language settings in the user's browser? Preferrably even allowing a default fallback language if no texts are available for the user's language.

Re: Localization: Title and caption

There is no way to auto-translate image titles and captions.
You'd really need to set up a separate XML file for each language that you want to support (same image data in each one, just with image titles and captions in different languages).

You could then load the gallery with the appropriate XML file using a configUrl (and a JavaScript variable) in the gallery's embedding code. (The configUrl option is noted in the Embed Options.)

For example, to support English, French and Spanish, you could have three XML files named 'config_english.xml', 'config_french.xml' and 'config_spanish.xml'.
You could then use something like the following:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>

    var lang = navigator.language.substring(0, 2).toLowerCase();

    var file;

    switch(lang) {
        case 'en':
            file = 'config_english.xml';
            break;
        case 'fr':
            file = 'config_french.xml';
            break;
        case 'es':
            file = 'config_spanish.xml';
            break;
        default:
            file = 'config_english.xml';
            break;
    }

    new juicebox({
        configUrl: file
        containerId: "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "#222222"
    });

</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

For reference, navigator.language is documented here.

I hoe this helps or at least points you in the right direction.
(The code above could certainly be optimized but I've tried to make it easy to read and understand.)