Skip to content

Commit 990c64f

Browse files
committed
Provide translation examples
1 parent 2db642d commit 990c64f

1 file changed

Lines changed: 161 additions & 6 deletions

File tree

src/index.js

Lines changed: 161 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,170 @@
11
import Mirador from 'mirador/dist/es/src/index';
22
import examplePlugin from './plugins/example_plugin';
33

4+
// Example: We have replaced all English UI strings with "MEOW"
5+
// TASK: Override a string in a language of your choice
46
const config = {
5-
id: 'mirador-viewer',
6-
windows: [
7-
{
8-
manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest',
7+
id: 'mirador-viewer',
8+
windows: [{
9+
manifestId: 'https://purl.stanford.edu/fr426cg9537/iiif/manifest',
10+
}],
11+
translations: {
12+
en: {
13+
"aboutMirador": "MEOW",
14+
"aboutThisItem": "MEOW",
15+
"addedFromUrl": "MEOW",
16+
"addManifestUrl": "MEOW",
17+
"addManifestUrlHelp": "MEOW",
18+
"addResource": "MEOW",
19+
"annotationCanvasLabel_1/1": "MEOW",
20+
"annotationCanvasLabel_1/2": "MEOW",
21+
"annotationCanvasLabel_2/2": "MEOW",
22+
"annotations": "MEOW",
23+
"attribution": "MEOW",
24+
"attributionTitle": "MEOW",
25+
"authenticationFailed": "MEOW",
26+
"authenticationRequired": "MEOW",
27+
"backToResults": "MEOW",
28+
"book": "MEOW",
29+
"bottom": "MEOW",
30+
"cancel": "MEOW",
31+
"canvasIndex": "MEOW",
32+
"changeTheme": "MEOW",
33+
"clearSearch": "MEOW",
34+
"closeAddResourceForm": "MEOW",
35+
"closeAddResourceMenu": "MEOW",
36+
"closeCompanionWindow": "MEOW",
37+
"closeWindow": "MEOW",
38+
"collapseSection": "MEOW",
39+
"collapseSidePanel": "MEOW",
40+
"itemList": "MEOW",
41+
"continue": "MEOW",
42+
"copy": "MEOW",
43+
"currentItem": "MEOW",
44+
"currentItem_1/1": "MEOW",
45+
"currentItem_1/2": "MEOW",
46+
"currentItem_2/2": "MEOW",
47+
"dark": "MEOW",
48+
"digitizedView": "MEOW",
49+
"dismiss": "MEOW",
50+
"highlightAllAnnotations": "MEOW",
51+
"displayNoAnnotations": "MEOW",
52+
"downloadExport": "MEOW",
53+
"downloadExportWorkspace": "MEOW",
54+
"elastic": "MEOW",
55+
"elasticDescription": "MEOW",
56+
"emptyResourceList": "MEOW",
57+
"error": "MEOW",
58+
"errorDialogConfirm": "MEOW",
59+
"errorDialogTitle": "MEOW",
60+
"exitFullScreen": "MEOW",
61+
"expandSection": "MEOW",
62+
"expandSidePanel": "MEOW",
63+
"exportCopied": "MEOW",
64+
"fetchManifest": "MEOW",
65+
"fullScreen": "MEOW",
66+
"gallery": "MEOW",
67+
"hideZoomControls": "MEOW",
68+
"iiif_homepage": "MEOW",
69+
"iiif_manifest": "MEOW",
70+
"iiif_renderings": "MEOW",
71+
"iiif_seeAlso": "MEOW",
72+
"import": "MEOW",
73+
"importWorkspace": "MEOW",
74+
"importWorkspaceHint": "MEOW",
75+
"item": "MEOW",
76+
"jsError": "MEOW",
77+
"jsStack": "MEOW",
78+
"language": "MEOW",
79+
"layer_hide": "MEOW",
80+
"layer_move": "MEOW",
81+
"layer_opacity": "MEOW",
82+
"layer_show": "MEOW",
83+
"layer_moveToTop": "MEOW",
84+
"layers": "MEOW",
85+
"light": "MEOW",
86+
"links": "MEOW",
87+
"listAllOpenWindows": "MEOW",
88+
"login": "MEOW",
89+
"logout": "MEOW",
90+
"manifestError": "MEOW",
91+
"maximizeWindow": "MEOW",
92+
"minimizeWindow": "MEOW",
93+
"mirador": "MEOW",
94+
"miradorResources": "MEOW",
95+
"miradorViewer": "MEOW",
96+
"more": "MEOW",
97+
"moreResults": "MEOW",
98+
"mosaic": "MEOW",
99+
"mosaicDescription": "MEOW",
100+
"moveCompanionWindowToBottom": "MEOW",
101+
"moveCompanionWindowToRight": "MEOW",
102+
"nextCanvas": "MEOW",
103+
"noItemSelected": "MEOW",
104+
"numItems": "MEOW",
105+
"off": "MEOW",
106+
"openCompanionWindow_annotations": "MEOW",
107+
"openCompanionWindow_attribution": "MEOW",
108+
"openCompanionWindow_canvas": "MEOW",
109+
"openCompanionWindow_info": "MEOW",
110+
"openCompanionWindow_layers": "MEOW",
111+
"openCompanionWindow_search": "MEOW",
112+
"openInCompanionWindow": "MEOW",
113+
"openWindows": "MEOW",
114+
"pagination": "MEOW",
115+
"position": "MEOW",
116+
"previewWindowTitle": "MEOW",
117+
"previousCanvas": "MEOW",
118+
"related": "MEOW",
119+
"resource": "MEOW",
120+
"retry": "MEOW",
121+
"right": "MEOW",
122+
"rights": "MEOW",
123+
"scroll": "MEOW",
124+
"searchInputLabel": "MEOW",
125+
"searchNextResult": "MEOW",
126+
"searchNoResults": "MEOW",
127+
"searchPreviousResult": "MEOW",
128+
"searchSubmitAria": "MEOW",
129+
"searchTitle": "MEOW",
130+
"selectWorkspaceMenu": "MEOW",
131+
"showingNumAnnotations": "MEOW",
132+
"showCollection": "MEOW",
133+
"showZoomControls": "MEOW",
134+
"sidebarPanelsNavigation": "MEOW",
135+
"single": "MEOW",
136+
"startHere": "MEOW",
137+
"suggestSearch": "MEOW",
138+
"tableOfContentsList": "MEOW",
139+
"theme": "MEOW",
140+
"thumbnailList": "MEOW",
141+
"thumbnailNavigation": "MEOW",
142+
"thumbnails": "MEOW",
143+
"toggleWindowSideBar": "MEOW",
144+
"totalCollections": "MEOW",
145+
"totalManifests": "MEOW",
146+
"tryAgain": "MEOW",
147+
"untitled": "MEOW",
148+
"view": "MEOW",
149+
"welcome": "MEOW",
150+
"window": "MEOW",
151+
"windowMenu": "MEOW",
152+
"windowNavigation": "MEOW",
153+
"windowPluginButtons": "MEOW",
154+
"windowPluginMenu": "MEOW",
155+
"workspace": "MEOW",
156+
"workspaceNavigation": "MEOW",
157+
"workspaceFullScreen": "MEOW",
158+
"workspaceMenu": "MEOW",
159+
"workspaceOptions": "MEOW",
160+
"workspaceSelectionTitle": "MEOW",
161+
"zoomIn": "MEOW",
162+
"zoomOut": "MEOW",
163+
"zoomReset": "MEOW",
164+
}
9165
}
10-
],
11166
};
12167

13168
const plugins = [];
14169

15-
Mirador.viewer(config, plugins);
170+
Mirador.viewer(config, plugins);

0 commit comments

Comments
 (0)