GedcomCodeTemp::templeName()   F
last analyzed

Complexity

Conditions 156
Paths 156

Size

Total Lines 470
Code Lines 313

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 156
eloc 313
nc 156
nop 1
dl 0
loc 470
rs 2.9599
c 0
b 0
f 0

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/**
4
 * webtrees: online genealogy
5
 * Copyright (C) 2022 webtrees development team
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
 * GNU General Public License for more details.
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
 */
17
18
declare(strict_types=1);
19
20
namespace Fisharebest\Webtrees\GedcomCode;
21
22
use Fisharebest\Webtrees\I18N;
23
24
/**
25
 * Class GedcomCodeTemp - Functions and logic for GEDCOM "TEMP" codes
26
 */
27
class GedcomCodeTemp
28
{
29
    /**
30
     * A list of GEDCOM tags that require a TEMP subtag
31
     *
32
     * @param string $tag
33
     *
34
     * @return bool
35
     */
36
    public static function isTagLDS(string $tag): bool
37
    {
38
        return $tag === 'BAPL' || $tag === 'CONL' || $tag === 'ENDL' || $tag === 'SLGC' || $tag === 'SLGS';
39
    }
40
41
    /**
42
     * A list of all temple codes, from the GEDCOM 5.5.1 specification
43
     *
44
     * Note that this list is out-of-date. We could add recently built
45
     * temples, but what codes would we use?
46
     *
47
     * @link http://en.wikipedia.org/wiki/List_of_temples_of_The_Church_of_Jesus_Christ_of_Latter-day_Saints
48
     * @link http://www.ldschurchtemples.com/codes/
49
     *
50
     * @return array<string>
51
     */
52
    public static function templeCodes(): array
53
    {
54
        return [
55
            'ABA',
56
            'ACCRA',
57
            'ADELA',
58
            'ALBER',
59
            'ALBUQ',
60
            'ANCHO',
61
            'ARIZO',
62
            'ASUNC',
63
            'ATLAN',
64
            'BAIRE',
65
            'BILLI',
66
            'BIRMI',
67
            'BISMA',
68
            'BOGOT',
69
            'BOISE',
70
            'BOSTO',
71
            'BOUNT',
72
            'BRIGH',
73
            'BRISB',
74
            'BROUG',
75
            'CALGA',
76
            'CAMPI',
77
            'CARAC',
78
            'CEBUP',
79
            'CHICA',
80
            'CIUJU',
81
            'COCHA',
82
            'COLJU',
83
            'COLSC',
84
            'COLUM',
85
            'COPEN',
86
            'CORDO',
87
            'CRIVE',
88
            'CURIT',
89
            'DALLA',
90
            'DENVE',
91
            'DETRO',
92
            'DRAPE',
93
            'EDMON',
94
            'EHOUS',
95
            'FORTL',
96
            'FRANK',
97
            'FREIB',
98
            'FRESN',
99
            'FUKUO',
100
            'GILAV',
101
            'GILBE',
102
            'GUADA',
103
            'GUATE',
104
            'GUAYA',
105
            'HAGUE',
106
            'HALIF',
107
            'HARTF',
108
            'HAWAI',
109
            'HELSI',
110
            'HERMO',
111
            'HKONG',
112
            'HOUST',
113
            'IFALL',
114
            'INDIA',
115
            'JOHAN',
116
            'JRIVE',
117
            'KANSA',
118
            'KONA',
119
            'KYIV',
120
            'LANGE',
121
            'LIMA',
122
            'LOGAN',
123
            'LONDO',
124
            'LOUIS',
125
            'LUBBO',
126
            'LVEGA',
127
            'MADRI',
128
            'MANAU',
129
            'MANHA',
130
            'MANIL',
131
            'MANTI',
132
            'MEDFO',
133
            'MELBO',
134
            'MEMPH',
135
            'MERID',
136
            'MEXIC',
137
            'MNTVD',
138
            'MONTE',
139
            'MONTI',
140
            'MONTR',
141
            'MTIMP',
142
            'NASHV',
143
            'NAUV2',
144
            'NAUVO',
145
            'NBEAC',
146
            'NUKUA',
147
            'NYORK',
148
            'NZEAL',
149
            'OAKLA',
150
            'OAXAC',
151
            'OGDEN',
152
            'OKLAH',
153
            'OQUIR',
154
            'ORLAN',
155
            'PALEG',
156
            'PALMY',
157
            'PANAM',
158
            'PAPEE',
159
            'PAYSO',
160
            'PERTH',
161
            'PHOEN',
162
            'POFFI',
163
            'PORTL',
164
            'PREST',
165
            'PROCC',
166
            'PROVO',
167
            'QUETZ',
168
            'RALEI',
169
            'RECIF',
170
            'REDLA',
171
            'REGIN',
172
            'RENO',
173
            'REXBU',
174
            'SACRA',
175
            'SAMOA',
176
            'SANTI',
177
            'SANSA',
178
            'SANTO',
179
            'SDIEG',
180
            'SDOMI',
181
            'SEATT',
182
            'SEOUL',
183
            'SGEOR',
184
            'SJOSE',
185
            'SLAKE',
186
            'SLOUI',
187
            'SNOWF',
188
            'SPAUL',
189
            'SPMIN',
190
            'SPOKA',
191
            'STOCK',
192
            'SUVA',
193
            'SWISS',
194
            'SYDNE',
195
            'TAIPE',
196
            'TAMPI',
197
            'TEGUC',
198
            'TGUTI',
199
            'TIHUA',
200
            'TOKYO',
201
            'TORNO',
202
            'TRUJI',
203
            'TWINF',
204
            'VANCO',
205
            'VERAC',
206
            'VERNA',
207
            'VILLA',
208
            'WASHI',
209
            'WINTE',
210
        ];
211
    }
212
213
    /**
214
     * Get the localized name for a temple code
215
     *
216
     * @param string $temple_code
217
     *
218
     * @return string
219
     */
220
    public static function templeName(string $temple_code): string
221
    {
222
        switch ($temple_code) {
223
            case 'ABA':
224
                /* I18N: Location of an LDS church temple */
225
                return I18N::translate('Aba, Nigeria');
226
            case 'ACCRA':
227
                /* I18N: Location of an LDS church temple */
228
                return I18N::translate('Accra, Ghana');
229
            case 'ADELA':
230
                /* I18N: Location of an LDS church temple */
231
                return I18N::translate('Adelaide, Australia');
232
            case 'ALBER':
233
                /* I18N: Location of an LDS church temple */
234
                return I18N::translate('Cardston, Alberta, Canada');
235
            case 'ALBUQ':
236
                /* I18N: Location of an LDS church temple */
237
                return I18N::translate('Albuquerque, New Mexico, United States');
238
            case 'ANCHO':
239
                /* I18N: Location of an LDS church temple */
240
                return I18N::translate('Anchorage, Alaska, United States');
241
            case 'APIA':
242
                /* I18N: Location of an LDS church temple */
243
                return I18N::translate('Apia, Samoa');
244
            case 'ARIZO':
245
                /* I18N: Location of an LDS church temple */
246
                return I18N::translate('Mesa, Arizona, United States');
247
            case 'ASUNC':
248
                /* I18N: Location of an LDS church temple */
249
                return I18N::translate('Asuncion, Paraguay');
250
            case 'ATLAN':
251
                /* I18N: Location of an LDS church temple */
252
                return I18N::translate('Atlanta, Georgia, United States');
253
            case 'BAIRE':
254
                /* I18N: Location of an LDS church temple */
255
                return I18N::translate('Buenos Aires, Argentina');
256
            case 'BILLI':
257
                /* I18N: Location of an LDS church temple */
258
                return I18N::translate('Billings, Montana, United States');
259
            case 'BIRMI':
260
                /* I18N: Location of an LDS church temple */
261
                return I18N::translate('Birmingham, Alabama, United States');
262
            case 'BISMA':
263
                /* I18N: Location of an LDS church temple */
264
                return I18N::translate('Bismarck, North Dakota, United States');
265
            case 'BOGOT':
266
                /* I18N: Location of an LDS church temple */
267
                return I18N::translate('Bogota, Colombia');
268
            case 'BOISE':
269
                /* I18N: Location of an LDS church temple */
270
                return I18N::translate('Boise, Idaho, United States');
271
            case 'BOSTO':
272
                /* I18N: Location of an LDS church temple */
273
                return I18N::translate('Boston, Massachusetts, United States');
274
            case 'BOUNT':
275
                /* I18N: Location of an LDS church temple */
276
                return I18N::translate('Bountiful, Utah, United States');
277
            case 'BRIGH':
278
                /* I18N: Location of an LDS church temple */
279
                return I18N::translate('Brigham City, Utah, United States');
280
            case 'BRISB':
281
                /* I18N: Location of an LDS church temple */
282
                return I18N::translate('Brisbane, Australia');
283
            case 'BROUG':
284
                /* I18N: Location of an LDS church temple */
285
                return I18N::translate('Baton Rouge, Louisiana, United States');
286
            case 'CALGA':
287
                /* I18N: Location of an LDS church temple */
288
                return I18N::translate('Calgary, Alberta, Canada');
289
            case 'CAMPI':
290
                /* I18N: Location of an LDS church temple */
291
                return I18N::translate('Campinas, Brazil');
292
            case 'CARAC':
293
                /* I18N: Location of an LDS church temple */
294
                return I18N::translate('Caracas, Venezuela');
295
            case 'CEBUP':
296
                /* I18N: Location of an LDS church temple */
297
                return I18N::translate('Cebu City, Philippines');
298
            case 'CHICA':
299
                /* I18N: Location of an LDS church temple */
300
                return I18N::translate('Chicago, Illinois, United States');
301
            case 'CIUJU':
302
                /* I18N: Location of an LDS church temple */
303
                return I18N::translate('Ciudad Juarez, Mexico');
304
            case 'COCHA':
305
                /* I18N: Location of an LDS church temple */
306
                return I18N::translate('Cochabamba, Bolivia');
307
            case 'COLJU':
308
                /* I18N: Location of an LDS church temple */
309
                return I18N::translate('Colonia Juarez, Mexico');
310
            case 'COLSC':
311
                /* I18N: Location of an LDS church temple */
312
                return I18N::translate('Columbia, South Carolina, United States');
313
            case 'COLUM':
314
                /* I18N: Location of an LDS church temple */
315
                return I18N::translate('Columbus, Ohio, United States');
316
            case 'COPEN':
317
                /* I18N: Location of an LDS church temple */
318
                return I18N::translate('Copenhagen, Denmark');
319
            case 'CORDO':
320
                /* I18N: Location of an LDS church temple */
321
                return I18N::translate('Cordoba, Argentina');
322
            case 'CRIVE':
323
                /* I18N: Location of an LDS church temple */
324
                return I18N::translate('Columbia River, Washington, United States');
325
            case 'CURIT':
326
                /* I18N: Location of an LDS church temple */
327
                return I18N::translate('Curitiba, Brazil');
328
            case 'DALLA':
329
                /* I18N: Location of an LDS church temple */
330
                return I18N::translate('Dallas, Texas, United States');
331
            case 'DENVE':
332
                /* I18N: Location of an LDS church temple */
333
                return I18N::translate('Denver, Colorado, United States');
334
            case 'DETRO':
335
                /* I18N: Location of an LDS church temple */
336
                return I18N::translate('Detroit, Michigan, United States');
337
            case 'DRAPE':
338
                /* I18N: Location of an LDS church temple */
339
                return I18N::translate('Draper, Utah, United States');
340
            case 'EDMON':
341
                /* I18N: Location of an LDS church temple */
342
                return I18N::translate('Edmonton, Alberta, Canada');
343
            case 'EHOUS':
344
                /* I18N: Location of an historic LDS church temple - http://en.wikipedia.org/wiki/Endowment_house */
345
                return I18N::translate('Endowment House');
346
            case 'FORTL':
347
                /* I18N: Location of an LDS church temple */
348
                return I18N::translate('Fort Lauderdale, Florida, United States');
349
            case 'FRANK':
350
                /* I18N: Location of an LDS church temple */
351
                return I18N::translate('Frankfurt am Main, Germany');
352
            case 'FREIB':
353
                /* I18N: Location of an LDS church temple */
354
                return I18N::translate('Freiburg, Germany');
355
            case 'FRESN':
356
                /* I18N: Location of an LDS church temple */
357
                return I18N::translate('Fresno, California, United States');
358
            case 'FUKUO':
359
                /* I18N: Location of an LDS church temple */
360
                return I18N::translate('Fukuoka, Japan');
361
            case 'GILAV':
362
                /* I18N: Location of an LDS church temple */
363
                return I18N::translate('Gila Valley, Arizona, United States');
364
            case 'GILBE':
365
                /* I18N: Location of an LDS church temple */
366
                return I18N::translate('Gilbert, Arizona, United States');
367
            case 'GUADA':
368
                /* I18N: Location of an LDS church temple */
369
                return I18N::translate('Guadalajara, Mexico');
370
            case 'GUATE':
371
                /* I18N: Location of an LDS church temple */
372
                return I18N::translate('Guatemala City, Guatemala');
373
            case 'GUAYA':
374
                /* I18N: Location of an LDS church temple */
375
                return I18N::translate('Guayaquil, Ecuador');
376
            case 'HAGUE':
377
                /* I18N: Location of an LDS church temple */
378
                return I18N::translate('The Hague, Netherlands');
379
            case 'HALIF':
380
                /* I18N: Location of an LDS church temple */
381
                return I18N::translate('Halifax, Nova Scotia, Canada');
382
            case 'HARTF':
383
                /* I18N: Location of an LDS church temple */
384
                return I18N::translate('Hartford, Connecticut, United States');
385
            case 'HAWAI':
386
                /* I18N: Location of an LDS church temple */
387
                return I18N::translate('Laie, Hawaii, United States');
388
            case 'HELSI':
389
                /* I18N: Location of an LDS church temple */
390
                return I18N::translate('Helsinki, Finland');
391
            case 'HERMO':
392
                /* I18N: Location of an LDS church temple */
393
                return I18N::translate('Hermosillo, Mexico');
394
            case 'HKONG':
395
                /* I18N: Location of an LDS church temple */
396
                return I18N::translate('Hong Kong');
397
            case 'HOUST':
398
                /* I18N: Location of an LDS church temple */
399
                return I18N::translate('Houston, Texas, United States');
400
            case 'IFALL':
401
                /* I18N: Location of an LDS church temple */
402
                return I18N::translate('Idaho Falls, Idaho, United States');
403
            case 'INDIA':
404
                /* I18N: Location of an LDS church temple */
405
                return I18N::translate('Indianapolis, Indiana, United States');
406
            case 'JOHAN':
407
                /* I18N: Location of an LDS church temple */
408
                return I18N::translate('Johannesburg, South Africa');
409
            case 'JRIVE':
410
                /* I18N: Location of an LDS church temple */
411
                return I18N::translate('Jordan River, Utah, United States');
412
            case 'KANSA':
413
                /* I18N: Location of an LDS church temple */
414
                return I18N::translate('Kansas City, Missouri, United States');
415
            case 'KONA':
416
                /* I18N: Location of an LDS church temple */
417
                return I18N::translate('Kona, Hawaii, United States');
418
            case 'KYIV':
419
                /* I18N: Location of an LDS church temple */
420
                return I18N::translate('Kyiv, Ukraine');
421
            case 'LANGE':
422
                /* I18N: Location of an LDS church temple */
423
                return I18N::translate('Los Angeles, California, United States');
424
            case 'LIMA':
425
                /* I18N: Location of an LDS church temple */
426
                return I18N::translate('Lima, Peru');
427
            case 'LOGAN':
428
                /* I18N: Location of an LDS church temple */
429
                return I18N::translate('Logan, Utah, United States');
430
            case 'LONDO':
431
                /* I18N: Location of an LDS church temple */
432
                return I18N::translate('London, England');
433
            case 'LOUIS':
434
                /* I18N: Location of an LDS church temple */
435
                return I18N::translate('Louisville, Kentucky, United States');
436
            case 'LUBBO':
437
                /* I18N: Location of an LDS church temple */
438
                return I18N::translate('Lubbock, Texas, United States');
439
            case 'LVEGA':
440
                /* I18N: Location of an LDS church temple */
441
                return I18N::translate('Las Vegas, Nevada, United States');
442
            case 'MADRI':
443
                /* I18N: Location of an LDS church temple */
444
                return I18N::translate('Madrid, Spain');
445
            case 'MANAU':
446
                /* I18N: Location of an LDS church temple */
447
                return I18N::translate('Manaus, Brazil');
448
            case 'MANHA':
449
                /* I18N: Location of an LDS church temple */
450
                return I18N::translate('Manhattan, New York, United States');
451
            case 'MANIL':
452
                /* I18N: Location of an LDS church temple */
453
                return I18N::translate('Manila, Philippines');
454
            case 'MANTI':
455
                /* I18N: Location of an LDS church temple */
456
                return I18N::translate('Manti, Utah, United States');
457
            case 'MEDFO':
458
                /* I18N: Location of an LDS church temple */
459
                return I18N::translate('Medford, Oregon, United States');
460
            case 'MELBO':
461
                /* I18N: Location of an LDS church temple */
462
                return I18N::translate('Melbourne, Australia');
463
            case 'MEMPH':
464
                /* I18N: Location of an LDS church temple */
465
                return I18N::translate('Memphis, Tennessee, United States');
466
            case 'MERID':
467
                /* I18N: Location of an LDS church temple */
468
                return I18N::translate('Merida, Mexico');
469
            case 'MEXIC':
470
                /* I18N: Location of an LDS church temple */
471
                return I18N::translate('Mexico City, Mexico');
472
            case 'MNTVD':
473
                /* I18N: Location of an LDS church temple */
474
                return I18N::translate('Montevideo, Uruguay');
475
            case 'MONTE':
476
                /* I18N: Location of an LDS church temple */
477
                return I18N::translate('Monterrey, Mexico');
478
            case 'MONTI':
479
                /* I18N: Location of an LDS church temple */
480
                return I18N::translate('Monticello, Utah, United States');
481
            case 'MONTR':
482
                /* I18N: Location of an LDS church temple */
483
                return I18N::translate('Montreal, Quebec, Canada');
484
            case 'MTIMP':
485
                /* I18N: Location of an LDS church temple */
486
                return I18N::translate('Mount Timpanogos, Utah, United States');
487
            case 'NASHV':
488
                /* I18N: Location of an LDS church temple */
489
                return I18N::translate('Nashville, Tennessee, United States');
490
            case 'NAUV2':
491
                /* I18N: Location of an LDS church temple */
492
                return I18N::translate('Nauvoo (new), Illinois, United States');
493
            case 'NAUVO':
494
                /* I18N: Location of an LDS church temple */
495
                return I18N::translate('Nauvoo (original), Illinois, United States');
496
            case 'NBEAC':
497
                /* I18N: Location of an LDS church temple */
498
                return I18N::translate('Newport Beach, California, United States');
499
            case 'NUKUA':
500
                /* I18N: Location of an LDS church temple */
501
                return I18N::translate('Nuku’Alofa, Tonga');
502
            case 'NYORK':
503
                /* I18N: Location of an LDS church temple */
504
                return I18N::translate('New York, New York, United States');
505
            case 'NZEAL':
506
                /* I18N: Location of an LDS church temple */
507
                return I18N::translate('Hamilton, New Zealand');
508
            case 'OAKLA':
509
                /* I18N: Location of an LDS church temple */
510
                return I18N::translate('Oakland, California, United States');
511
            case 'OAXAC':
512
                /* I18N: Location of an LDS church temple */
513
                return I18N::translate('Oaxaca, Mexico');
514
            case 'OGDEN':
515
                /* I18N: Location of an LDS church temple */
516
                return I18N::translate('Ogden, Utah, United States');
517
            case 'OKLAH':
518
                /* I18N: Location of an LDS church temple */
519
                return I18N::translate('Oklahoma City, Oklahoma, United States');
520
            case 'OQUIR':
521
                /* I18N: Location of an LDS church temple */
522
                return I18N::translate('Oquirrh Mountain, Utah, United States');
523
            case 'ORLAN':
524
                /* I18N: Location of an LDS church temple */
525
                return I18N::translate('Orlando, Florida, United States');
526
            case 'PALEG':
527
                /* I18N: Location of an LDS church temple */
528
                return I18N::translate('Porto Alegre, Brazil');
529
            case 'PALMY':
530
                /* I18N: Location of an LDS church temple */
531
                return I18N::translate('Palmyra, New York, United States');
532
            case 'PANAM':
533
                /* I18N: Location of an LDS church temple */
534
                return I18N::translate('Panama City, Panama');
535
            case 'PAPEE':
536
                /* I18N: Location of an LDS church temple */
537
                return I18N::translate('Papeete, Tahiti');
538
            case 'PAYSO':
539
                /* I18N: Location of an LDS church temple */
540
                return I18N::translate('Payson, Utah, United States');
541
            case 'PERTH':
542
                /* I18N: Location of an LDS church temple */
543
                return I18N::translate('Perth, Australia');
544
            case 'PHOEN':
545
                /* I18N: Location of an LDS church temple */
546
                return I18N::translate('Phoenix, Arizona, United States');
547
            case 'POFFI':
548
                /* I18N: I18N: Location of an historic LDS church temple - http://en.wikipedia.org/wiki/President_of_the_Church */
549
                return I18N::translate('President’s Office');
550
            case 'PORTL':
551
                /* I18N: Location of an LDS church temple */
552
                return I18N::translate('Portland, Oregon, United States');
553
            case 'PREST':
554
                /* I18N: Location of an LDS church temple */
555
                return I18N::translate('Preston, England');
556
            case 'PROCC':
557
                /* I18N: Location of an LDS church temple */
558
                return I18N::translate('Provo City Center, Utah, United States');
559
            case 'PROVO':
560
                /* I18N: Location of an LDS church temple */
561
                return I18N::translate('Provo, Utah, United States');
562
            case 'QUETZ':
563
                /* I18N: Location of an LDS church temple */
564
                return I18N::translate('Quetzaltenango, Guatemala');
565
            case 'RALEI':
566
                /* I18N: Location of an LDS church temple */
567
                return I18N::translate('Raleigh, North Carolina, United States');
568
            case 'RECIF':
569
                /* I18N: Location of an LDS church temple */
570
                return I18N::translate('Recife, Brazil');
571
            case 'REDLA':
572
                /* I18N: Location of an LDS church temple */
573
                return I18N::translate('Redlands, California, United States');
574
            case 'REGIN':
575
                /* I18N: Location of an LDS church temple */
576
                return I18N::translate('Regina, Saskatchewan, Canada');
577
            case 'RENO':
578
                /* I18N: Location of an LDS church temple */
579
                return I18N::translate('Reno, Nevada, United States');
580
            case 'REXBU':
581
                /* I18N: Location of an LDS church temple */
582
                return I18N::translate('Rexburg, Idaho, United States');
583
            case 'SACRA':
584
                /* I18N: Location of an LDS church temple */
585
                return I18N::translate('Sacramento, California, United States');
586
            case 'SANSA':
587
                /* I18N: Location of an LDS church temple */
588
                return I18N::translate('San Salvador, El Salvador');
589
            case 'SANTI':
590
                /* I18N: Location of an LDS church temple */
591
                return I18N::translate('Santiago, Chile');
592
            case 'SANTO':
593
                /* I18N: Location of an LDS church temple */
594
                return I18N::translate('San Antonio, Texas, United States');
595
            case 'SDIEG':
596
                /* I18N: Location of an LDS church temple */
597
                return I18N::translate('San Diego, California, United States');
598
            case 'SDOMI':
599
                /* I18N: Location of an LDS church temple */
600
                return I18N::translate('Santo Domingo, Dominican Republic');
601
            case 'SEATT':
602
                /* I18N: Location of an LDS church temple */
603
                return I18N::translate('Seattle, Washington, United States');
604
            case 'SEOUL':
605
                /* I18N: Location of an LDS church temple */
606
                return I18N::translate('Seoul, Korea');
607
            case 'SGEOR':
608
                /* I18N: Location of an LDS church temple */
609
                return I18N::translate('St. George, Utah, United States');
610
            case 'SJOSE':
611
                /* I18N: Location of an LDS church temple */
612
                return I18N::translate('San Jose, Costa Rica');
613
            case 'SLAKE':
614
                /* I18N: Location of an LDS church temple */
615
                return I18N::translate('Salt Lake City, Utah, United States');
616
            case 'SLOUI':
617
                /* I18N: Location of an LDS church temple */
618
                return I18N::translate('St. Louis, Missouri, United States');
619
            case 'SNOWF':
620
                /* I18N: Location of an LDS church temple */
621
                return I18N::translate('Snowflake, Arizona, United States');
622
            case 'SPAUL':
623
                /* I18N: Location of an LDS church temple */
624
                return I18N::translate('Sao Paulo, Brazil');
625
            case 'SPMIN':
626
                /* I18N: Location of an LDS church temple */
627
                return I18N::translate('St. Paul, Minnesota, United States');
628
            case 'SPOKA':
629
                /* I18N: Location of an LDS church temple */
630
                return I18N::translate('Spokane, Washington, United States');
631
            case 'STOCK':
632
                /* I18N: Location of an LDS church temple */
633
                return I18N::translate('Stockholm, Sweden');
634
            case 'SUVA':
635
                /* I18N: Location of an LDS church temple */
636
                return I18N::translate('Suva, Fiji');
637
            case 'SWISS':
638
                /* I18N: Location of an LDS church temple */
639
                return I18N::translate('Bern, Switzerland');
640
            case 'SYDNE':
641
                /* I18N: Location of an LDS church temple */
642
                return I18N::translate('Sydney, Australia');
643
            case 'TAIPE':
644
                /* I18N: Location of an LDS church temple */
645
                return I18N::translate('Taipei, Taiwan');
646
            case 'TAMPI':
647
                /* I18N: Location of an LDS church temple */
648
                return I18N::translate('Tampico, Mexico');
649
            case 'TEGUC':
650
                /* I18N: Location of an LDS church temple */
651
                return I18N::translate('Tegucigalpa, Honduras');
652
            case 'TGUTI':
653
                /* I18N: Location of an LDS church temple */
654
                return I18N::translate('Tuxtla Gutierrez, Mexico');
655
            case 'TIJUA':
656
                /* I18N: Location of an LDS church temple */
657
                return I18N::translate('Tijuana, Mexico');
658
            case 'TOKYO':
659
                /* I18N: Location of an LDS church temple */
660
                return I18N::translate('Tokyo, Japan');
661
            case 'TORNO':
662
                /* I18N: Location of an LDS church temple */
663
                return I18N::translate('Toronto, Ontario, Canada');
664
            case 'TRUJI':
665
                /* I18N: Location of an LDS church temple */
666
                return I18N::translate('Trujillo, Peru');
667
            case 'TWINF':
668
                /* I18N: Location of an LDS church temple */
669
                return I18N::translate('Twin Falls, Idaho, United States');
670
            case 'VANCO':
671
                /* I18N: Location of an LDS church temple */
672
                return I18N::translate('Vancouver, British Columbia, Canada');
673
            case 'VERAC':
674
                /* I18N: Location of an LDS church temple */
675
                return I18N::translate('Veracruz, Mexico');
676
            case 'VERNA':
677
                /* I18N: Location of an LDS church temple */
678
                return I18N::translate('Vernal, Utah, United States');
679
            case 'VILLA':
680
                /* I18N: Location of an LDS church temple */
681
                return I18N::translate('Villa Hermosa, Mexico');
682
            case 'WASHI':
683
                /* I18N: Location of an LDS church temple */
684
                return I18N::translate('Washington, District of Columbia, United States');
685
            case 'WINTE':
686
                /* I18N: Location of an LDS church temple */
687
                return I18N::translate('Winter Quarters, Nebraska, United States');
688
            default:
689
                return $temple_code;
690
        }
691
    }
692
693
    /**
694
     * A sorted list of all temple names
695
     *
696
     * @return array<string>
697
     */
698
    public static function templeNames(): array
699
    {
700
        $temple_names = [];
701
        foreach (self::templeCodes() as $temple_code) {
702
            $temple_names[$temple_code] = self::templeName($temple_code);
703
        }
704
        uasort($temple_names, '\Fisharebest\Webtrees\I18N::strcasecmp');
705
706
        return $temple_names;
707
    }
708
}
709