xref: /webtrees/app/Elements/TempleCode.php (revision 2ebcf907ed34213f816592af04e6c160335d6311)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2021 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
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Elements;
21
22use Fisharebest\Webtrees\I18N;
23
24use function strtoupper;
25
26/**
27 * TEMPLE_CODE := {Size=4:5}
28 * An abbreviation of the temple in which the LDS ordinances were performed.
29 * (See Appendix B, page 96.)
30 */
31class TempleCode extends AbstractElement
32{
33    /**
34     * Convert a value to a canonical form.
35     *
36     * @param string $value
37     *
38     * @return string
39     */
40    public function canonical(string $value): string
41    {
42        return strtoupper(parent::canonical($value));
43    }
44
45    /**
46     * A list of controlled values for this element
47     *
48     * @return array<int|string,string>
49     */
50    public function values(): array
51    {
52        $values = [
53            'ABA'   => /* I18N: Location of an LDS church temple */ I18N::translate('Aba, Nigeria'),
54            'ACCRA' => /* I18N: Location of an LDS church temple */ I18N::translate('Accra, Ghana'),
55            'ADELA' => /* I18N: Location of an LDS church temple */ I18N::translate('Adelaide, Australia'),
56            'ALBER' => /* I18N: Location of an LDS church temple */ I18N::translate('Cardston, Alberta, Canada'),
57            'ALBUQ' => /* I18N: Location of an LDS church temple */ I18N::translate('Albuquerque, New Mexico, United States'),
58            'ANCHO' => /* I18N: Location of an LDS church temple */ I18N::translate('Anchorage, Alaska, United States'),
59            'APIA'  => /* I18N: Location of an LDS church temple */ I18N::translate('Apia, Samoa'),
60            'ARIZO' => /* I18N: Location of an LDS church temple */ I18N::translate('Mesa, Arizona, United States'),
61            'ASUNC' => /* I18N: Location of an LDS church temple */ I18N::translate('Asuncion, Paraguay'),
62            'ATLAN' => /* I18N: Location of an LDS church temple */ I18N::translate('Atlanta, Georgia, United States'),
63            'BAIRE' => /* I18N: Location of an LDS church temple */ I18N::translate('Buenos Aires, Argentina'),
64            'BILLI' => /* I18N: Location of an LDS church temple */ I18N::translate('Billings, Montana, United States'),
65            'BIRMI' => /* I18N: Location of an LDS church temple */ I18N::translate('Birmingham, Alabama, United States'),
66            'BISMA' => /* I18N: Location of an LDS church temple */ I18N::translate('Bismarck, North Dakota, United States'),
67            'BOGOT' => /* I18N: Location of an LDS church temple */ I18N::translate('Bogota, Colombia'),
68            'BOISE' => /* I18N: Location of an LDS church temple */ I18N::translate('Boise, Idaho, United States'),
69            'BOSTO' => /* I18N: Location of an LDS church temple */ I18N::translate('Boston, Massachusetts, United States'),
70            'BOUNT' => /* I18N: Location of an LDS church temple */ I18N::translate('Bountiful, Utah, United States'),
71            'BRIGH' => /* I18N: Location of an LDS church temple */ I18N::translate('Brigham City, Utah, United States'),
72            'BRISB' => /* I18N: Location of an LDS church temple */ I18N::translate('Brisbane, Australia'),
73            'BROUG' => /* I18N: Location of an LDS church temple */ I18N::translate('Baton Rouge, Louisiana, United States'),
74            'CALGA' => /* I18N: Location of an LDS church temple */ I18N::translate('Calgary, Alberta, Canada'),
75            'CAMPI' => /* I18N: Location of an LDS church temple */ I18N::translate('Campinas, Brazil'),
76            'CARAC' => /* I18N: Location of an LDS church temple */ I18N::translate('Caracas, Venezuela'),
77            'CEBUP' => /* I18N: Location of an LDS church temple */ I18N::translate('Cebu City, Philippines'),
78            'CHICA' => /* I18N: Location of an LDS church temple */ I18N::translate('Chicago, Illinois, United States'),
79            'CIUJU' => /* I18N: Location of an LDS church temple */ I18N::translate('Ciudad Juarez, Mexico'),
80            'COCHA' => /* I18N: Location of an LDS church temple */ I18N::translate('Cochabamba, Bolivia'),
81            'COLJU' => /* I18N: Location of an LDS church temple */ I18N::translate('Colonia Juarez, Mexico'),
82            'COLSC' => /* I18N: Location of an LDS church temple */ I18N::translate('Columbia, South Carolina, United States'),
83            'COLUM' => /* I18N: Location of an LDS church temple */ I18N::translate('Columbus, Ohio, United States'),
84            'COPEN' => /* I18N: Location of an LDS church temple */ I18N::translate('Copenhagen, Denmark'),
85            'CORDO' => /* I18N: Location of an LDS church temple */ I18N::translate('Cordoba, Argentina'),
86            'CRIVE' => /* I18N: Location of an LDS church temple */ I18N::translate('Columbia River, Washington, United States'),
87            'CURIT' => /* I18N: Location of an LDS church temple */ I18N::translate('Curitiba, Brazil'),
88            'DALLA' => /* I18N: Location of an LDS church temple */ I18N::translate('Dallas, Texas, United States'),
89            'DENVE' => /* I18N: Location of an LDS church temple */ I18N::translate('Denver, Colorado, United States'),
90            'DETRO' => /* I18N: Location of an LDS church temple */ I18N::translate('Detroit, Michigan, United States'),
91            'DRAPE' => /* I18N: Location of an LDS church temple */ I18N::translate('Draper, Utah, United States'),
92            'EDMON' => /* I18N: Location of an LDS church temple */ I18N::translate('Edmonton, Alberta, Canada'),
93            'EHOUS' => /* I18N: Location of an historic LDS church temple - https://en.wikipedia.org/wiki/Endowment_house */ I18N::translate('Endowment House'),
94            'FORTL' => /* I18N: Location of an LDS church temple */ I18N::translate('Fort Lauderdale, Florida, United States'),
95            'FRANK' => /* I18N: Location of an LDS church temple */ I18N::translate('Frankfurt am Main, Germany'),
96            'FREIB' => /* I18N: Location of an LDS church temple */ I18N::translate('Freiburg, Germany'),
97            'FRESN' => /* I18N: Location of an LDS church temple */ I18N::translate('Fresno, California, United States'),
98            'FUKUO' => /* I18N: Location of an LDS church temple */ I18N::translate('Fukuoka, Japan'),
99            'GILAV' => /* I18N: Location of an LDS church temple */ I18N::translate('Gila Valley, Arizona, United States'),
100            'GILBE' => /* I18N: Location of an LDS church temple */ I18N::translate('Gilbert, Arizona, United States'),
101            'GUADA' => /* I18N: Location of an LDS church temple */ I18N::translate('Guadalajara, Mexico'),
102            'GUATE' => /* I18N: Location of an LDS church temple */ I18N::translate('Guatemala City, Guatemala'),
103            'GUAYA' => /* I18N: Location of an LDS church temple */ I18N::translate('Guayaquil, Ecuador'),
104            'HAGUE' => /* I18N: Location of an LDS church temple */ I18N::translate('The Hague, Netherlands'),
105            'HALIF' => /* I18N: Location of an LDS church temple */ I18N::translate('Halifax, Nova Scotia, Canada'),
106            'HARTF' => /* I18N: Location of an LDS church temple */ I18N::translate('Hartford, Connecticut, United States'),
107            'HAWAI' => /* I18N: Location of an LDS church temple */ I18N::translate('Laie, Hawaii, United States'),
108            'HELSI' => /* I18N: Location of an LDS church temple */ I18N::translate('Helsinki, Finland'),
109            'HERMO' => /* I18N: Location of an LDS church temple */ I18N::translate('Hermosillo, Mexico'),
110            'HKONG' => /* I18N: Location of an LDS church temple */ I18N::translate('Hong Kong'),
111            'HOUST' => /* I18N: Location of an LDS church temple */ I18N::translate('Houston, Texas, United States'),
112            'IFALL' => /* I18N: Location of an LDS church temple */ I18N::translate('Idaho Falls, Idaho, United States'),
113            'INDIA' => /* I18N: Location of an LDS church temple */ I18N::translate('Indianapolis, Indiana, United States'),
114            'JOHAN' => /* I18N: Location of an LDS church temple */ I18N::translate('Johannesburg, South Africa'),
115            'JRIVE' => /* I18N: Location of an LDS church temple */ I18N::translate('Jordan River, Utah, United States'),
116            'KANSA' => /* I18N: Location of an LDS church temple */ I18N::translate('Kansas City, Missouri, United States'),
117            'KONA'  => /* I18N: Location of an LDS church temple */ I18N::translate('Kona, Hawaii, United States'),
118            'KYIV'  => /* I18N: Location of an LDS church temple */ I18N::translate('Kyiv, Ukraine'),
119            'LANGE' => /* I18N: Location of an LDS church temple */ I18N::translate('Los Angeles, California, United States'),
120            'LIMA'  => /* I18N: Location of an LDS church temple */ I18N::translate('Lima, Peru'),
121            'LOGAN' => /* I18N: Location of an LDS church temple */ I18N::translate('Logan, Utah, United States'),
122            'LONDO' => /* I18N: Location of an LDS church temple */ I18N::translate('London, England'),
123            'LOUIS' => /* I18N: Location of an LDS church temple */ I18N::translate('Louisville, Kentucky, United States'),
124            'LUBBO' => /* I18N: Location of an LDS church temple */ I18N::translate('Lubbock, Texas, United States'),
125            'LVEGA' => /* I18N: Location of an LDS church temple */ I18N::translate('Las Vegas, Nevada, United States'),
126            'MADRI' => /* I18N: Location of an LDS church temple */ I18N::translate('Madrid, Spain'),
127            'MANAU' => /* I18N: Location of an LDS church temple */ I18N::translate('Manaus, Brazil'),
128            'MANHA' => /* I18N: Location of an LDS church temple */ I18N::translate('Manhattan, New York, United States'),
129            'MANIL' => /* I18N: Location of an LDS church temple */ I18N::translate('Manila, Philippines'),
130            'MANTI' => /* I18N: Location of an LDS church temple */ I18N::translate('Manti, Utah, United States'),
131            'MEDFO' => /* I18N: Location of an LDS church temple */ I18N::translate('Medford, Oregon, United States'),
132            'MELBO' => /* I18N: Location of an LDS church temple */ I18N::translate('Melbourne, Australia'),
133            'MEMPH' => /* I18N: Location of an LDS church temple */ I18N::translate('Memphis, Tennessee, United States'),
134            'MERID' => /* I18N: Location of an LDS church temple */ I18N::translate('Merida, Mexico'),
135            'MEXIC' => /* I18N: Location of an LDS church temple */ I18N::translate('Mexico City, Mexico'),
136            'MNTVD' => /* I18N: Location of an LDS church temple */ I18N::translate('Montevideo, Uruguay'),
137            'MONTE' => /* I18N: Location of an LDS church temple */ I18N::translate('Monterrey, Mexico'),
138            'MONTI' => /* I18N: Location of an LDS church temple */ I18N::translate('Monticello, Utah, United States'),
139            'MONTR' => /* I18N: Location of an LDS church temple */ I18N::translate('Montreal, Quebec, Canada'),
140            'MTIMP' => /* I18N: Location of an LDS church temple */ I18N::translate('Mount Timpanogos, Utah, United States'),
141            'NASHV' => /* I18N: Location of an LDS church temple */ I18N::translate('Nashville, Tennessee, United States'),
142            'NAUV2' => /* I18N: Location of an LDS church temple */ I18N::translate('Nauvoo (new), Illinois, United States'),
143            'NAUVO' => /* I18N: Location of an LDS church temple */ I18N::translate('Nauvoo (original), Illinois, United States'),
144            'NBEAC' => /* I18N: Location of an LDS church temple */ I18N::translate('Newport Beach, California, United States'),
145            'NUKUA' => /* I18N: Location of an LDS church temple */ I18N::translate('Nuku’Alofa, Tonga'),
146            'NYORK' => /* I18N: Location of an LDS church temple */ I18N::translate('New York, New York, United States'),
147            'NZEAL' => /* I18N: Location of an LDS church temple */ I18N::translate('Hamilton, New Zealand'),
148            'OAKLA' => /* I18N: Location of an LDS church temple */ I18N::translate('Oakland, California, United States'),
149            'OAXAC' => /* I18N: Location of an LDS church temple */ I18N::translate('Oaxaca, Mexico'),
150            'OGDEN' => /* I18N: Location of an LDS church temple */ I18N::translate('Ogden, Utah, United States'),
151            'OKLAH' => /* I18N: Location of an LDS church temple */ I18N::translate('Oklahoma City, Oklahoma, United States'),
152            'OQUIR' => /* I18N: Location of an LDS church temple */ I18N::translate('Oquirrh Mountain, Utah, United States'),
153            'ORLAN' => /* I18N: Location of an LDS church temple */ I18N::translate('Orlando, Florida, United States'),
154            'PALEG' => /* I18N: Location of an LDS church temple */ I18N::translate('Porto Alegre, Brazil'),
155            'PALMY' => /* I18N: Location of an LDS church temple */ I18N::translate('Palmyra, New York, United States'),
156            'PANAM' => /* I18N: Location of an LDS church temple */ I18N::translate('Panama City, Panama'),
157            'PAPEE' => /* I18N: Location of an LDS church temple */ I18N::translate('Papeete, Tahiti'),
158            'PAYSO' => /* I18N: Location of an LDS church temple */ I18N::translate('Payson, Utah, United States'),
159            'PERTH' => /* I18N: Location of an LDS church temple */ I18N::translate('Perth, Australia'),
160            'PHOEN' => /* I18N: Location of an LDS church temple */ I18N::translate('Phoenix, Arizona, United States'),
161            'POFFI' => /* I18N: Location of an historic LDS church temple - https://en.wikipedia.org/wiki/President_of_the_Church */ I18N::translate('President’s Office'),
162            'PORTL' => /* I18N: Location of an LDS church temple */ I18N::translate('Portland, Oregon, United States'),
163            'PREST' => /* I18N: Location of an LDS church temple */ I18N::translate('Preston, England'),
164            'PROCC' => /* I18N: Location of an LDS church temple */ I18N::translate('Provo City Center, Utah, United States'),
165            'PROVO' => /* I18N: Location of an LDS church temple */ I18N::translate('Provo, Utah, United States'),
166            'QUETZ' => /* I18N: Location of an LDS church temple */ I18N::translate('Quetzaltenango, Guatemala'),
167            'RALEI' => /* I18N: Location of an LDS church temple */ I18N::translate('Raleigh, North Carolina, United States'),
168            'RECIF' => /* I18N: Location of an LDS church temple */ I18N::translate('Recife, Brazil'),
169            'REDLA' => /* I18N: Location of an LDS church temple */ I18N::translate('Redlands, California, United States'),
170            'REGIN' => /* I18N: Location of an LDS church temple */ I18N::translate('Regina, Saskatchewan, Canada'),
171            'RENO'  => /* I18N: Location of an LDS church temple */ I18N::translate('Reno, Nevada, United States'),
172            'REXBU' => /* I18N: Location of an LDS church temple */ I18N::translate('Rexburg, Idaho, United States'),
173            'SACRA' => /* I18N: Location of an LDS church temple */ I18N::translate('Sacramento, California, United States'),
174            'SANSA' => /* I18N: Location of an LDS church temple */ I18N::translate('San Salvador, El Salvador'),
175            'SANTI' => /* I18N: Location of an LDS church temple */ I18N::translate('Santiago, Chile'),
176            'SANTO' => /* I18N: Location of an LDS church temple */ I18N::translate('San Antonio, Texas, United States'),
177            'SDIEG' => /* I18N: Location of an LDS church temple */ I18N::translate('San Diego, California, United States'),
178            'SDOMI' => /* I18N: Location of an LDS church temple */ I18N::translate('Santo Domingo, Dominican Republic'),
179            'SEATT' => /* I18N: Location of an LDS church temple */ I18N::translate('Seattle, Washington, United States'),
180            'SEOUL' => /* I18N: Location of an LDS church temple */ I18N::translate('Seoul, Korea'),
181            'SGEOR' => /* I18N: Location of an LDS church temple */ I18N::translate('St. George, Utah, United States'),
182            'SJOSE' => /* I18N: Location of an LDS church temple */ I18N::translate('San Jose, Costa Rica'),
183            'SLAKE' => /* I18N: Location of an LDS church temple */ I18N::translate('Salt Lake City, Utah, United States'),
184            'SLOUI' => /* I18N: Location of an LDS church temple */ I18N::translate('St. Louis, Missouri, United States'),
185            'SNOWF' => /* I18N: Location of an LDS church temple */ I18N::translate('Snowflake, Arizona, United States'),
186            'SPAUL' => /* I18N: Location of an LDS church temple */ I18N::translate('Sao Paulo, Brazil'),
187            'SPMIN' => /* I18N: Location of an LDS church temple */ I18N::translate('St. Paul, Minnesota, United States'),
188            'SPOKA' => /* I18N: Location of an LDS church temple */ I18N::translate('Spokane, Washington, United States'),
189            'STOCK' => /* I18N: Location of an LDS church temple */ I18N::translate('Stockholm, Sweden'),
190            'SUVA'  => /* I18N: Location of an LDS church temple */ I18N::translate('Suva, Fiji'),
191            'SWISS' => /* I18N: Location of an LDS church temple */ I18N::translate('Bern, Switzerland'),
192            'SYDNE' => /* I18N: Location of an LDS church temple */ I18N::translate('Sydney, Australia'),
193            'TAIPE' => /* I18N: Location of an LDS church temple */ I18N::translate('Taipei, Taiwan'),
194            'TAMPI' => /* I18N: Location of an LDS church temple */ I18N::translate('Tampico, Mexico'),
195            'TEGUC' => /* I18N: Location of an LDS church temple */ I18N::translate('Tegucigalpa, Honduras'),
196            'TGUTI' => /* I18N: Location of an LDS church temple */ I18N::translate('Tuxtla Gutierrez, Mexico'),
197            'TIJUA' => /* I18N: Location of an LDS church temple */ I18N::translate('Tijuana, Mexico'),
198            'TOKYO' => /* I18N: Location of an LDS church temple */ I18N::translate('Tokyo, Japan'),
199            'TORNO' => /* I18N: Location of an LDS church temple */ I18N::translate('Toronto, Ontario, Canada'),
200            'TRUJI' => /* I18N: Location of an LDS church temple */ I18N::translate('Trujillo, Peru'),
201            'TWINF' => /* I18N: Location of an LDS church temple */ I18N::translate('Twin Falls, Idaho, United States'),
202            'VANCO' => /* I18N: Location of an LDS church temple */ I18N::translate('Vancouver, British Columbia, Canada'),
203            'VERAC' => /* I18N: Location of an LDS church temple */ I18N::translate('Veracruz, Mexico'),
204            'VERNA' => /* I18N: Location of an LDS church temple */ I18N::translate('Vernal, Utah, United States'),
205            'VILLA' => /* I18N: Location of an LDS church temple */ I18N::translate('Villa Hermosa, Mexico'),
206            'WASHI' => /* I18N: Location of an LDS church temple */ I18N::translate('Washington, District of Columbia, United States'),
207            'WINTE' => /* I18N: Location of an LDS church temple */ I18N::translate('Winter Quarters, Nebraska, United States'),
208        ];
209
210        uasort($values, I18N::comparator());
211        $values = ['' => I18N::translate('No temple - living ordinance')] + $values;
212
213        return $values;
214    }
215}
216