From 579f0cb50999c8a383a063674ec4a22dab0dc282 Mon Sep 17 00:00:00 2001 From: Camille Villa Date: Thu, 3 Dec 2020 19:28:00 -0800 Subject: [PATCH] Add an example with multilingual metadata --- src/index.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index 941eebd..8cea04f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,15 +1,20 @@ import Mirador from 'mirador/dist/es/src/index'; import examplePlugin from './plugins/example_plugin'; +// An example with a multilingual manifest. Metadata is available in English and German. const config = { - id: 'mirador-viewer', - windows: [ - { - manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest', - } - ], + id: 'mirador-viewer', + language: 'de', // Use German as the default UI language. + // If metadata is available in the UI language, it will be displayed in the sidebar + windows: [{ + manifestId: 'https://iiif.hab.de/object/mss_272-helmst/manifest.json', + }], + window: { + sideBarOpen: true, + showLocalePicker: true, // The metadata locale picker is hidden by default + }, }; const plugins = []; -Mirador.viewer(config, plugins); +Mirador.viewer(config, plugins); \ No newline at end of file