xref: /webtrees/app/Module/LanguageHebrew.php (revision d11be7027e34e3121be11cc025421873364403f9)
102086832SGreg Roach<?php
23976b470SGreg Roach
302086832SGreg Roach/**
402086832SGreg Roach * webtrees: online genealogy
5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
602086832SGreg Roach * This program is free software: you can redistribute it and/or modify
702086832SGreg Roach * it under the terms of the GNU General Public License as published by
802086832SGreg Roach * the Free Software Foundation, either version 3 of the License, or
902086832SGreg Roach * (at your option) any later version.
1002086832SGreg Roach * This program is distributed in the hope that it will be useful,
1102086832SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1202086832SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1302086832SGreg Roach * GNU General Public License for more details.
1402086832SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
1602086832SGreg Roach */
17fcfa147eSGreg Roach
1802086832SGreg Roachdeclare(strict_types=1);
1902086832SGreg Roach
2002086832SGreg Roachnamespace Fisharebest\Webtrees\Module;
2102086832SGreg Roach
224a9a6095SGreg Roachuse Fisharebest\ExtCalendar\CalendarInterface;
23f0c88a96SGreg Roachuse Fisharebest\ExtCalendar\JewishCalendar;
2402086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleHe;
2502086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleInterface;
2602086832SGreg Roach
2702086832SGreg Roach/**
2802086832SGreg Roach * Class LanguageHebrew.
2902086832SGreg Roach */
3002086832SGreg Roachclass LanguageHebrew extends AbstractModule implements ModuleLanguageInterface
3102086832SGreg Roach{
3202086832SGreg Roach    use ModuleLanguageTrait;
3302086832SGreg Roach
3402086832SGreg Roach    /**
354a9a6095SGreg Roach     * Phone-book ordering of letters.
364a9a6095SGreg Roach     *
374a9a6095SGreg Roach     * @return array<int,string>
384a9a6095SGreg Roach     */
394a9a6095SGreg Roach    public function alphabet(): array
404a9a6095SGreg Roach    {
414a9a6095SGreg Roach        return ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז', 'ח', 'ט', 'י', 'כ', 'ל', 'מ', 'נ', 'ס', 'ע', 'פ', 'צ', 'ק', 'ר', 'ש', 'ת'];
424a9a6095SGreg Roach    }
434a9a6095SGreg Roach
444a9a6095SGreg Roach    /**
454a9a6095SGreg Roach     * Default calendar used by this language.
464a9a6095SGreg Roach     *
474a9a6095SGreg Roach     * @return CalendarInterface
484a9a6095SGreg Roach     */
494a9a6095SGreg Roach    public function calendar(): CalendarInterface
504a9a6095SGreg Roach    {
514a9a6095SGreg Roach        return new JewishCalendar();
524a9a6095SGreg Roach    }
534a9a6095SGreg Roach
544a9a6095SGreg Roach    /**
5502086832SGreg Roach     * @return LocaleInterface
5602086832SGreg Roach     */
5702086832SGreg Roach    public function locale(): LocaleInterface
5802086832SGreg Roach    {
5902086832SGreg Roach        return new LocaleHe();
6002086832SGreg Roach    }
6102086832SGreg Roach}
62