-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example with multilingual metadata
- Loading branch information
1 parent
2db642d
commit 579f0cb
Showing
1 changed file
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |