xref: /webtrees/app/Elements/NameType.php (revision e99ac601cee7ced57ac8545ceba47ece1b15d883)
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
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Elements;
21
22use Fisharebest\Webtrees\I18N;
23
24/**
25 * NAME_TYPE := {Size=5:30}
26 * [ aka | birth | immigrant | maiden | married | <user defined>]
27 * Indicates the name type, for example the name issued or assumed as an immigrant.
28 * aka          = also known as, alias, etc.
29 * birth        = name given on birth certificate.
30 * immigrant    = name assumed at the time of immigration.
31 * maiden       = maiden name, name before first marriage.
32 * married      =name was persons previous married name.
33 * user_defined = other text name that defines the name type.
34 */
35class NameType extends AbstractElement
36{
37    /**
38     * A list of controlled values for this element
39     *
40     * @return array<int|string,string>
41     */
42    public function values(): array
43    {
44        return [
45            ''          => '',
46            'adopted'   => /* I18N: The name given to a child by its adoptive parents */
47                I18N::translate('adopted name'),
48            'aka'       => /* I18N: The name by which an individual is also known. e.g. a professional name or a stage name */
49                I18N::translate('also known as'),
50            'birth'     => /* I18N: The name given to an individual at their birth */
51                I18N::translate('birth name'),
52            'change'    => /* I18N: A name chosen by an individual, to replace their existing name (whether legal or otherwise) */
53                I18N::translate('change of name'),
54            'estate'    => /* I18N: A name given to an individual, from the farm or estate on which they lived or worked */
55                I18N::translate('estate name'),
56            'immigrant' => /* I18N: A name taken on immigration - e.g. migrants to the USA frequently anglicized their names */
57                I18N::translate('immigration name'),
58            'maiden'    => /* I18N: A woman’s name, before she marries (in cultures where women take their new husband’s name on marriage) */
59                I18N::translate('maiden name'),
60            'married'   => /* I18N: A name taken on marriage - usually the wife takes the husband’s surname */
61                I18N::translate('married name'),
62            'religious' => /* I18N: A name taken when entering a religion or a religious order */
63                I18N::translate('religious name'),
64        ];
65    }
66}
67