forked from websense/websense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocalization.php
384 lines (329 loc) · 19.8 KB
/
localization.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<?php
/**
* This script adds two arrays (for client and server side) with the correct locale for the current call to the global namespace,
* determined by the session. Defaults to English.
*
* @package main
*/
$all_messages = array(
'english' => array(
'server' => array(
// banner.php
'banner.logo.hsma.alt' => 'Logo of the Hochschule Mannheim',
'banner.logo.hsma.title' => 'Visit the Hochschule Mannheim',
'banner.logo.uwa.alt' => 'Logo of the University of Western Australia',
'banner.logo.uwa.title' => 'Visit the University of Western Australia',
'banner.title' => 'WebSense: Sensor Network Viewer',
'banner.navigation.home' => 'Home',
'banner.navigation.administration' => 'Administration',
'banner.navigation.publications' => 'Publications',
'banner.navigation.downloads' => 'Downloads',
'banner.navigation.contact' => 'Contact',
// contact.php
'contact.title' => 'Websense3 - Contact',
'contact.paragraph.1' => 'This application is based on
a Java-based WebSense application developed at the
Hochschule Mannheim, Germany.',
'contact.paragraph.2' => 'The following people have contributed
to versions of
this system and its database.',
'contact.feedback.paragraph.1' => 'Please send us a',
'contact.feedback.mail' => 'feedback email',
'contact.feedback.paragraph.2' => 'if you have any comments, notice
a bug or would like a copy of this software.',
// downloads.php
'downloads.title' => 'Websense3 - Downloads and Documentation',
'downloads.used.software' => 'Used 3rd Party Software',
'downloads.apache.web.server' => 'Apache Web Server',
'downloads.postgresql' => 'PostgreSQL Database',
'downloads.jquery' => 'jQuery',
'downloads.jqueryui' => 'jQuery UI',
'downloads.jpgraph' => 'JpGraph',
'downloads.installation' => 'Installation Instructions',
'downloads.link' => 'Link',
'downloads.database.skeleton' => 'Database Skeleton',
'downloads.webapp.code' => 'Web Application Code',
'downloads.tba' => 'TBA',
// index.php
'index.title' => 'Websense3',
'index.tabs.overview' => 'Overview',
'index.tabs.event.history' => 'Event History',
'index.tabs.phenomena' => 'Phenomena',
'index.tabs.sensors' => 'Sensors',
'index.tabs.graphs' => 'Graphs',
'index.tabs.sensor.health' => 'Sensor Health',
'index.tabs.heat.map' => 'Heat Map',
// menu.php
'menu.no.trials' => 'There are no trials (yet) to select.',
'menu.info.paragraph.1' => 'Select one or more trials of the list below and click "Change Location".',
'menu.info.paragraph.2' => 'These trials can then be queried through the tabs.',
'menu.buttons.checkall' => 'Check all',
'menu.buttons.uncheckall' => 'Uncheck all',
'menu.buttons.submit' => 'Change Location',
// opendb.php
'opendb.error' => 'Cannot connect to test database. Try editing opendb.php to set the real database.',
// publications.php
'publications.title' => 'Websense3 - Publications',
'publications.overview' => 'Websense Overview',
'publications.deployments' => 'Sensor Network Deployments',
// create_graph.php
'create.graph.error.generic' => 'Please select one or more Sensor Nodes to display and select output format.',
'create.graph.error.query.enddate' => 'Error performing enddate query.',
'create.graph.error.query.startdate' => 'Error performing startdate query.',
'create.graph.error.date.interval.missing' => 'Please specify date interval.',
'create.graph.error.query.num.days' => 'Error performing num days query.',
'create.graph.error.query.name' => 'Error performing name query.',
'create.graph.error.query.csv' => 'Error performing csv query.',
'create.graph.graph.title' => 'Sensor data for {trialname} from {startdate} to {enddate}',
'create.graph.error.query.time.wert' => 'Error performing time,wert graph query',
// create_heat_map.php
'create.heat.map.error.query.main' => 'Error performing heat map query.',
'create.heat.map.error.query.phenomenon' => 'Error performing phenomenon bounds query.',
// event_history.php
'event.history.multiple.trials.selected' => 'View individual networks for further information.',
'event.history.error.query.blog' => 'Error performing blog query.',
'event.history.no.events' => 'There are no events recorded for this trial.',
// get_params.php
'get.params.missing.params' => 'Invalid GET request. "trials" or "trials[]" must be set.',
// graphs.php
'graphs.error.query.dates' => 'Error performing dates query.',
'graphs.no.measurements' => 'No measurements are recorded yet.',
'graphs.form.time.interval' => 'Select Time Interval',
'graphs.form.last.24h' => 'Last 24 Hours',
'graphs.form.last.7d' => 'Last 7 Days',
'graphs.form.last' => 'Last',
'graphs.form.hours' => 'Hours',
'graphs.form.days' => 'Days',
'graphs.form.all' => 'Everything',
'graphs.form.fixed.interval' => 'Fixed Date Interval...',
'graphs.form.date.start' => 'Start Date:',
'graphs.form.date.end' => 'End Date:',
'graphs.form.by.type' => 'Select Sensor Time Series by Type',
'graphs.form.output' => 'Choose output format',
'graphs.form.output.graph' => 'Graph (Opens in new window)',
'graphs.form.output.csv' => 'Download CSV file',
'graphs.form.submit' => 'Submit Query',
'graphs.form.reset' => 'Reset Form',
// heat_map.php
'heat.map.error.query.date' => 'Error performing dates query.',
'heat.map.error.query.no.measurements' => 'No measurements are recorded yet.',
'heat.map.error.query.phenomena' => 'Error performing phenomena query.',
'heat.map.error.query.depth' => 'Error performing depth query.',
'heat.map.form.time.of.measurement' => 'Select Time of Measurement',
'heat.map.form.date' => 'Date',
'heat.map.form.hour.of.day' => 'Hour of Day (0-23, format: "HH"):',
'heat.map.form.include.minutes' => 'Include following Minutes:',
'heat.map.form.select.phenomenon' => 'Select Phenomenon',
'heat.map.form.depth.in.centimeters' => 'Select Depth in Centimeters',
'heat.map.form.submit' => 'Submit Query',
'heat.map.form.reset' => 'Reset Form',
'heat.map.scale.toggle.popup' => 'Toggle relative scale (sensor values relative to each other) on/off',
'heat.map.spectrum.alt' => 'Color range of the heat map from minimum to maximum.',
// overview.php
'overview.error.query.node' => 'Error performing node id query.',
'overview.error.query.count' => 'Error performing number of nodes query.',
'overview.error.query.trial.info' => 'Error performing trial info query.',
'overview.num.nodes' => 'Number of nodes',
'overview.total.measurements' => 'Total measurements',
'overview.observation.first' => 'First observation',
'overview.observation.last' => 'Last observation',
'overview.contact.address' => 'Contact address',
// phenomena.php
'phenomena.error.query.phenomena' => 'Error performing phenomena query.',
'phenomena.no.phenomena' => 'No phenomena are observed at this trial yet.',
'phenomena.table.phenomenon' => 'Phenomenon',
'phenomena.table.unit' => 'Unit',
'phenomena.table.minimum' => 'Min. Constraint',
'phenomena.table.maximum' => 'Max. Constraint',
'phenomena.table.calibration' => 'Calibration',
// sensor_health.php
'sensor.health.error.query.main' => 'Error performing sensor health query.',
'sensor.health.no.data' => 'None of the sensors collected data yet.',
'sensor.health.table.sensor' => 'Sensor',
'sensor.health.table.measurement' => 'Measurement',
'sensor.health.table.value' => 'Value',
'sensor.health.table.unit' => 'Unit',
'sensor.health.table.measurement.last' => 'Last Measurement',
'sensor.health.table.popup.last.h' => 'Last hour',
'sensor.health.table.popup.last.24h' => 'Last 24 hours',
// sensors.php
'sensors.error.query.sensordevice' => 'Error performing sensordevice query.',
'sensors.error.no.sensor.types' => 'No known type of sensor is used at this trial.',
'sensors.table.description' => 'Description',
'sensors.table.calibration' => 'Calibration',
'sensors.table.measurement.method' => 'Measurement Method',
'sensors.table.datasheet' => 'Datasheet',
// testgraph.php
'testgraph.title' => 'Graph to test that jpgraph library and links are working correctly',
'testgraph.pressure' => 'Pressure '
),
'client' => array(
'key' => 'englishvalue'
)
),
'german' => array(
'server' => array(
// banner.php
'banner.logo.hsma.alt' => 'Logo of the Hochschule Mannheim',
'banner.logo.hsma.title' => 'Visit the Hochschule Mannheim',
'banner.logo.uwa.alt' => 'Logo of the University of Western Australia',
'banner.logo.uwa.title' => 'Visit the University of Western Australia',
'banner.title' => 'WebSense: Sensor Network Viewer, auf deutsch. Hurra.',
'banner.navigation.home' => 'Home',
'banner.navigation.administration' => 'Administration',
'banner.navigation.publications' => 'Publications',
'banner.navigation.downloads' => 'Downloads',
'banner.navigation.contact' => 'Contact',
// contact.php
'contact.title' => 'Websense3 - Contact',
'contact.paragraph.1' => 'This application is based on
a Java-based WebSense application developed at the
Hochschule Mannheim, Germany.',
'contact.paragraph.2' => 'The following people have contributed
to versions of
this system and its database.',
'contact.feedback.paragraph.1' => 'Please send us a',
'contact.feedback.mail' => 'feedback email',
'contact.feedback.paragraph.2' => 'if you have any comments, notice
a bug or would like a copy of this software.',
// downloads.php
'downloads.title' => 'Websense3 - Downloads and Documentation',
'downloads.used.software' => 'Used 3rd Party Software',
'downloads.apache.web.server' => 'Apache Web Server',
'downloads.postgresql' => 'PostgreSQL Database',
'downloads.jquery' => 'jQuery',
'downloads.jqueryui' => 'jQuery UI',
'downloads.jpgraph' => 'JpGraph',
'downloads.installation' => 'Installation Instructions',
'downloads.link' => 'Link',
'downloads.database.skeleton' => 'Database Skeleton',
'downloads.webapp.code' => 'Web Application Code',
'downloads.tba' => 'TBA',
// index.php
'index.title' => 'Websense3',
'index.tabs.overview' => 'Overview',
'index.tabs.event.history' => 'Event History',
'index.tabs.phenomena' => 'Phenomena',
'index.tabs.sensors' => 'Sensors',
'index.tabs.graphs' => 'Graphs',
'index.tabs.sensor.health' => 'Sensor Health',
'index.tabs.heat.map' => 'Heat Map',
// menu.php
'menu.no.trials' => 'There are no trials (yet) to select.',
'menu.info.paragraph.1' => 'Select one or more trials of the list below and click "Change Location".',
'menu.info.paragraph.2' => 'These trials can then be queried through the tabs.',
'menu.buttons.checkall' => 'Check all',
'menu.buttons.uncheckall' => 'Uncheck all',
'menu.buttons.submit' => 'Change Location',
// opendb.php
'opendb.error' => 'Cannot connect to test database. Try editing opendb.php to set the real database.',
// publications.php
'publications.title' => 'Websense3 - Publications',
'publications.overview' => 'Websense Overview',
'publications.deployments' => 'Sensor Network Deployments',
// create_graph.php
'create.graph.error.generic' => 'Please select one or more Sensor Nodes to display and select output format.',
'create.graph.error.query.enddate' => 'Error performing enddate query.',
'create.graph.error.query.startdate' => 'Error performing startdate query.',
'create.graph.error.date.interval.missing' => 'Please specify date interval.',
'create.graph.error.query.num.days' => 'Error performing num days query.',
'create.graph.error.query.name' => 'Error performing name query.',
'create.graph.error.query.csv' => 'Error performing csv query.',
'create.graph.graph.title' => 'Sensor data for {trialname} from {startdate} to {enddate}',
'create.graph.error.query.time.wert' => 'Error performing time,wert graph query',
// create_heat_map.php
'create.heat.map.error.query.main' => 'Error performing heat map query.',
'create.heat.map.error.query.phenomenon' => 'Error performing phenomenon bounds query.',
// event_history.php
'event.history.multiple.trials.selected' => 'View individual networks for further information.',
'event.history.error.query.blog' => 'Error performing blog query.',
'event.history.no.events' => 'There are no events recorded for this trial.',
// get_params.php
'get.params.missing.params' => 'Invalid GET request. "trials" or "trials[]" must be set.',
// graphs.php
'graphs.error.query.dates' => 'Error performing dates query.',
'graphs.no.measurements' => 'No measurements are recorded yet.',
'graphs.form.time.interval' => 'Select Time Interval',
'graphs.form.last.24h' => 'Last 24 Hours',
'graphs.form.last.7d' => 'Last 7 Days',
'graphs.form.last' => 'Last',
'graphs.form.hours' => 'Hours',
'graphs.form.days' => 'Days',
'graphs.form.all' => 'Everything',
'graphs.form.fixed.interval' => 'Fixed Date Interval...',
'graphs.form.date.start' => 'Start Date:',
'graphs.form.date.end' => 'End Date:',
'graphs.form.by.type' => 'Select Sensor Time Series by Type',
'graphs.form.output' => 'Choose output format',
'graphs.form.output.graph' => 'Graph (Opens in new window)',
'graphs.form.output.csv' => 'Download CSV file',
'graphs.form.submit' => 'Submit Query',
'graphs.form.reset' => 'Reset Form',
// heat_map.php
'heat.map.error.query.date' => 'Error performing dates query.',
'heat.map.error.query.no.measurements' => 'No measurements are recorded yet.',
'heat.map.error.query.phenomena' => 'Error performing phenomena query.',
'heat.map.error.query.depth' => 'Error performing depth query.',
'heat.map.form.time.of.measurement' => 'Select Time of Measurement',
'heat.map.form.date' => 'Date',
'heat.map.form.hour.of.day' => 'Hour of Day (0-23, format: "HH"):',
'heat.map.form.include.minutes' => 'Include following Minutes:',
'heat.map.form.select.phenomenon' => 'Select Phenomenon',
'heat.map.form.depth.in.centimeters' => 'Select Depth in Centimeters',
'heat.map.form.submit' => 'Submit Query',
'heat.map.form.reset' => 'Reset Form',
'heat.map.scale.toggle.popup' => 'Toggle relative scale (sensor values relative to each other) on/off',
'heat.map.spectrum.alt' => 'Color range of the heat map from minimum to maximum.',
// overview.php
'overview.error.query.node' => 'Error performing node id query.',
'overview.error.query.count' => 'Error performing number of nodes query.',
'overview.error.query.trial.info' => 'Error performing trial info query.',
'overview.num.nodes' => 'Number of nodes',
'overview.total.measurements' => 'Total measurements',
'overview.observation.first' => 'First observation',
'overview.observation.last' => 'Last observation',
'overview.contact.address' => 'Contact address',
// phenomena.php
'phenomena.error.query.phenomena' => 'Error performing phenomena query.',
'phenomena.no.phenomena' => 'No phenomena are observed at this trial yet.',
'phenomena.table.phenomenon' => 'Phenomenon',
'phenomena.table.unit' => 'Unit',
'phenomena.table.minimum' => 'Min. Constraint',
'phenomena.table.maximum' => 'Max. Constraint',
'phenomena.table.calibration' => 'Calibration',
// sensor_health.php
'sensor.health.error.query.main' => 'Error performing sensor health query.',
'sensor.health.no.data' => 'None of the sensors collected data yet.',
'sensor.health.table.sensor' => 'Sensor',
'sensor.health.table.measurement' => 'Measurement',
'sensor.health.table.value' => 'Value',
'sensor.health.table.unit' => 'Unit',
'sensor.health.table.measurement.last' => 'Last Measurement',
'sensor.health.table.popup.last.h' => 'Last hour',
'sensor.health.table.popup.last.24h' => 'Last 24 hours',
// sensors.php
'sensors.error.query.sensordevice' => 'Error performing sensordevice query.',
'sensors.error.no.sensor.types' => 'No known type of sensor is used at this trial.',
'sensors.table.description' => 'Description',
'sensors.table.calibration' => 'Calibration',
'sensors.table.measurement.method' => 'Measurement Method',
'sensors.table.datasheet' => 'Datasheet',
// testgraph.php
'testgraph.title' => 'Graph to test that jpgraph library and links are working correctly',
'testgraph.pressure' => 'Pressure '
),
'client' => array(
'key' => 'germanvalue'
)
)
);
session_start();
if (array_key_exists('locale', $_SESSION) && array_key_exists($_SESSION['locale'], $all_messages)) {
$messages = $all_messages[$_SESSION['locale']]['server'];
$client_messages = $all_messages[$_SESSION['locale']]['client'];
} else {
// Default to English.
$messages = $all_messages['english']['server'];
$client_messages = $all_messages['english']['client'];
}
?>