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
import { settings } from './settings.js';
export const getDefaultLanguage = () => {
const userLang = navigator.language || navigator.userLanguage;
if (languages[userLang] !== undefined) return userLang;
return 'en';
};
export const getLanguages = () => Object.keys(languages);
export const t = (key, ...params) => {
let translation = languages[settings.language][key];
if (!translation) translation = languages['en'][key]
if (!translation) return key;
while (params.length >= 1)
translation = translation.replace('{}', params.shift());
return translation;
};
const languages = {
'de': {
'access_full': 'Barrierefrei',
'access_none': 'Keine Einschränkungen',
'access_partial': 'Bedingt barrierefrei',
'accessibility': 'Barrierefreiheit',
'arrival': 'Ankunft',
'bus': 'Bus',
'cancelled-ride': 'Fahrt entfällt!',
'changeinfo': '{} Umstiegsdauer',
'changes': 'Umstiege',
'clearstorage': 'Lokale Daten löschen',
'datasource': 'Datenquelle',
'date': 'Datum',
'de': 'Deutsch',
'departure': 'Abfahrt',
'duration': 'Dauer',
'planned': 'geplant',
'dzug': 'D-Zug',
'en': 'Englisch',
'ferry': 'Fähre',
'from': 'Von',
'graphical': 'Grafische Darstellung in der Verbindungsübersicht',
'iceonly': 'ICE',
'iconly': 'IC',
'journeyoverview': 'Verbindungsübersicht aufrufen',
'label_earlier': 'Frühere Verbindungen',
'label_later': 'Spätere Verbindungen',
'lang_short': 'de',
'language': 'Sprache',
'lastjourney': 'Letzte gewählte Verbindung aufrufen',
'longdistancetrain': 'Fernverkehr',
'nl': 'Niederländisch',
'optional': '(optional)',
'options': 'Optionen',
'platform': 'Gleis',
'product': 'Produkt',
'regionaltrain': 'Regionalverkehr',
'remarks': 'Hinweise',
'save': 'Speichern',
'search': 'Suchen',
'setfromto': 'Als Von/Nach setzen',
'settings': 'Einstellungen',
'showdebug': 'Debugnachrichten ins Log schreiben',
'showds100': 'RIL100-Kürzel anzeigen (wenn verfügbar)',
'station': 'Station',
'suburbantrain': 'S-Bahn',
'subway': 'U-Bahn',
'swap': 'Von/Nach tauschen',
'taxi': 'Taxi',
'time': 'Uhrzeit',
'to': 'Nach',
'tram': 'Tram',
'transferinfo': 'Reise nach {}',
'update': 'Anwendung updaten',
'via': 'Über',
'walkinfo': 'Laufe nach {}',
'walkinfo_meters': 'Laufe nach {} (ca. {} Meter)',
'load-low-to-medium': 'Niedrige bis mittlere Auslastung',
'load-high': 'Hohe Auslastung',
'load-very-high': 'Sehr hohe Auslastung',
'load-exceptionally-high': 'Extrem hohe Auslastung',
'table-view': 'Tabelle',
'show-prices': 'Preise anzeigen',
'combineDateTime': 'Kombinierte Zeit & Datumseingabe verwenden',
'titleSetDateTimeNow': 'Setze Uhrzeit & Datum auf jetzt',
'titleBikeFriendly': 'Fahrradmitnahme möglich',
'loyaltyCard': 'Ermäßigungskarte',
'loyaltyCardNone': 'keine Ermäßigungskarte',
'class': 'Klasse',
'titleNoTransfers': 'keine Umstiege zulassen',
'lastSelectedJourney': 'Zuletzt gewählte Verbindung',
'walkingSpeed': 'Gehgeschwindigkeit',
'walkingSpeedSlow': 'langsam',
'walkingSpeedNormal': 'normal',
'walkingSpeedFast': 'schnell',
'shareURL': 'Link teilen',
'copyURL': 'Link kopieren',
'ageGroup': 'Altersgruppe',
'ageGroupChild': 'Kind',
'ageGroupYoung': 'Jung',
'ageGroupAdult': 'Erwachsen',
'ageGroupSenior': 'Senior',
'now': 'Jetzt',
},
'nl': {
'access_full': 'Toegankelijk',
'access_none': 'Geen beperkingen',
'access_partial': 'Beperkt toegankelijk',
'accessibility': 'Toegankelijkheid',
'arrival': 'Aankomst',
'bus': 'Bus',
'cancelled-ride': 'Rit geannuleerd',
'changeinfo': '{} overstaptijd',
'changes': 'Overstappen',
'clearstorage': 'Lokale gegevens wissen',
'datasource': 'Gegevensbron',
'date': 'Datum',
'de': 'Duits',
'departure': 'Vertrek',
'duration': 'Duur',
'planned': 'gepland',
'dzug': 'Sneltrein',
'en': 'Engels',
'ferry': 'Veerboot',
'from': 'Van',
'graphical': 'Grafische presentatie in het verbindingsoverzicht',
'iceonly': 'ICE',
'iconly': 'IC',
'journeyoverview': 'Toon verbindingsoverzicht',
'label_earlier': 'Vroegere verbindingen',
'label_later': 'Latere verbindingen',
'lang_short': 'nl',
'language': 'Taal',
'lastjourney': 'Laatste gekozen verbinding tonen',
'longdistancetrain': 'Lange-afstandverkeer',
'nl': 'Nederlands',
'optional': '(optioneel)',
'options': 'Opties',
'platform': 'Spoor',
'products': 'Producten',
'regionaltrain': 'Regionaal verkeer',
'remarks': 'Opmerkingen',
'save': 'Opslaan',
'search': 'Zoeken',
'setfromto': 'Als Van/Naar zetten',
'settings': 'Instellingen',
'showdebug': 'Debugberichten in logboek schrijven',
'showds100': 'RIL100-afkortingen tonen (indien aanwezig)',
'station': 'Station',
'suburbantrain': 'S-trein',
'subway': 'Metro',
'swap': 'Van/Naar omkeren',
'taxi': 'Taxi',
'time': 'Tijd',
'to': 'Naar',
'tram': 'Tram',
'transferinfo': 'Reis naar {}',
'update': 'Applicatie updaten',
'via': 'Over',
'walkinfo': 'Ga naar {}',
'walkinfo_meters': 'Ga naar {} (ong. {} meter)',
'load-low-to-medium': 'Niet druk',
'load-high': 'Druk',
'load-very-high': 'Zéér druk',
'load-exceptionally-high': 'Extreem druk',
'table-view': 'Tabel',
'show-prices': 'Prijzen tonen',
},
'en': {
'access_full': 'full',
'access_none': 'none',
'access_partial': 'partial',
'accessibility': 'Accessibillity',
'arrival': 'Arrival',
'bus': 'Bus',
'cancelled-ride': 'Cancelled!',
'changeinfo': '{} change duration',
'changes': 'Changes',
'clearstorage': 'Remove local data',
'datasource': 'Data source',
'date': 'Date',
'de': 'German',
'departure': 'Departure',
'duration': 'Duration',
'planned': 'planned',
'dzug': 'D-Zug',
'en': 'English',
'ferry': 'Ferry',
'from': 'From',
'graphical': 'Graphical overview for journeys',
'iceonly': 'ICE',
'iconly': 'IC',
'journeyoverview': 'Go to journeysoverview',
'label_earlier': 'Earlier connections',
'label_later': 'Later connections',
'lang_short': 'en',
'language': 'Language',
'lastjourney': 'Go to last selected journey',
'longdistancetrain': 'Long distance trains',
'nl': 'Dutch',
'optional': '(optional)',
'options': 'Options',
'platform': 'Platform',
'products': 'Products',
'regionaltrain': 'Regional trains',
'remarks': 'Remarks',
'save': 'Save',
'search': 'Search',
'setfromto': 'Set as from/to',
'settings': 'Settings',
'showdebug': 'Write debug messages to log',
'showds100': 'Show DS100 (if available)',
'station': 'Station',
'suburbantrain': 'Suburban Trains',
'subway': 'Subway',
'swap': 'Swap from/to',
'taxi': 'Taxi',
'time': 'Time',
'to': 'To',
'tram': 'Tram',
'transferinfo': 'Travel to {}',
'update': 'Update application',
'via': 'Via',
'walkinfo': 'Walk to {}',
'walkinfo_meters': 'Walk to {} (apprx. {} meters)',
'load-low-to-medium': 'Low to medium load',
'load-high': 'High load',
'load-very-high': 'Very high load',
'load-exceptionally-high': 'Exceptionally high load',
'table-view': 'Table',
'canvas-view': 'Canvas',
'show-prices': 'Show prices',
'price': 'Price',
'back': 'Back',
'reload': 'Refresh data',
'combineDateTime': 'Use combined DateTime-input',
'titleSetDateTimeNow': 'Set Date & Time to now',
'titleBikeFriendly': 'Bicycle transport possible',
'loyaltyCard': 'Discount Card',
'loyaltyCardNone': 'No discount card',
'class': 'Class',
'titleNoTransfers': 'only direct connections',
'lastSelectedJourney': 'Last selected Journey',
'walkingSpeed': 'Walking speed',
'walkingSpeedSlow': 'slow',
'walkingSpeedNormal': 'normal',
'walkingSpeedFast': 'fast',
'shareURL': 'Share URL',
'copyURL': 'Copy URL',
'ageGroup': 'Age group',
'ageGroupChild': 'Child',
'ageGroupYoung': 'Young',
'ageGroupAdult': 'Adult',
'ageGroupSenior': 'Senior',
'now': 'Now',
}
};