xref: /webtrees/app/Module/LanguageSerbian.php (revision b9a4a6c608ac9f9f3bf6c12fbe1fbe871f30fedb)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 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\Module;
21
22use Fisharebest\Localization\Locale\LocaleInterface;
23use Fisharebest\Localization\Locale\LocaleSr;
24use Fisharebest\Webtrees\Encodings\UTF8;
25
26/**
27 * Class LanguageSerbian (Cyrillic).
28 */
29class LanguageSerbian extends AbstractModule implements ModuleLanguageInterface
30{
31    use ModuleLanguageTrait;
32
33    /**
34     * Phone-book ordering of letters.
35     *
36     * @return array<int,string>
37     */
38    public function alphabet(): array
39    {
40        return [
41            UTF8::CYRILLIC_CAPITAL_LETTER_A,
42            UTF8::CYRILLIC_CAPITAL_LETTER_BE,
43            UTF8::CYRILLIC_CAPITAL_LETTER_VE,
44            UTF8::CYRILLIC_CAPITAL_LETTER_GHE,
45            UTF8::CYRILLIC_CAPITAL_LETTER_DE,
46            UTF8::CYRILLIC_CAPITAL_LETTER_DJE,
47            UTF8::CYRILLIC_CAPITAL_LETTER_IE,
48            UTF8::CYRILLIC_CAPITAL_LETTER_ZHE,
49            UTF8::CYRILLIC_CAPITAL_LETTER_ZE,
50            UTF8::CYRILLIC_CAPITAL_LETTER_I,
51            UTF8::CYRILLIC_CAPITAL_LETTER_JE,
52            UTF8::CYRILLIC_CAPITAL_LETTER_KA,
53            UTF8::CYRILLIC_CAPITAL_LETTER_EL,
54            UTF8::CYRILLIC_CAPITAL_LETTER_LJE,
55            UTF8::CYRILLIC_CAPITAL_LETTER_EM,
56            UTF8::CYRILLIC_CAPITAL_LETTER_EN,
57            UTF8::CYRILLIC_CAPITAL_LETTER_NJE,
58            UTF8::CYRILLIC_CAPITAL_LETTER_O,
59            UTF8::CYRILLIC_CAPITAL_LETTER_PE,
60            UTF8::CYRILLIC_CAPITAL_LETTER_ER,
61            UTF8::CYRILLIC_CAPITAL_LETTER_ES,
62            UTF8::CYRILLIC_CAPITAL_LETTER_TE,
63            UTF8::CYRILLIC_CAPITAL_LETTER_TSHE,
64            UTF8::CYRILLIC_CAPITAL_LETTER_U,
65            UTF8::CYRILLIC_CAPITAL_LETTER_EF,
66            UTF8::CYRILLIC_CAPITAL_LETTER_HA,
67            UTF8::CYRILLIC_CAPITAL_LETTER_TSE,
68            UTF8::CYRILLIC_CAPITAL_LETTER_CHE,
69            UTF8::CYRILLIC_CAPITAL_LETTER_DZHE,
70            UTF8::CYRILLIC_CAPITAL_LETTER_SHA,
71        ];
72    }
73
74    /**
75     * Should this module be enabled when it is first installed?
76     *
77     * @return bool
78     */
79    public function isEnabledByDefault(): bool
80    {
81        return false;
82    }
83
84    /**
85     * @return LocaleInterface
86     */
87    public function locale(): LocaleInterface
88    {
89        return new LocaleSr();
90    }
91}
92