xref: /webtrees/app/Module/LanguageArabic.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\ArabicCalendar;
234a9a6095SGreg Roachuse Fisharebest\ExtCalendar\CalendarInterface;
2402086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleAr;
2502086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleInterface;
2652288ec7SGreg Roachuse Fisharebest\Webtrees\Encodings\UTF8;
2702086832SGreg Roach
2802086832SGreg Roach/**
2902086832SGreg Roach * Class LanguageArabic.
3002086832SGreg Roach */
3102086832SGreg Roachclass LanguageArabic extends AbstractModule implements ModuleLanguageInterface
3202086832SGreg Roach{
3302086832SGreg Roach    use ModuleLanguageTrait;
3402086832SGreg Roach
3502086832SGreg Roach    /**
364a9a6095SGreg Roach     * Phone-book ordering of letters.
374a9a6095SGreg Roach     *
384a9a6095SGreg Roach     * @return array<int,string>
394a9a6095SGreg Roach     */
404a9a6095SGreg Roach    public function alphabet(): array
414a9a6095SGreg Roach    {
4252288ec7SGreg Roach        return [
4352288ec7SGreg Roach            UTF8::ARABIC_LETTER_ALEF,
4452288ec7SGreg Roach            UTF8::ARABIC_LETTER_BEH,
4552288ec7SGreg Roach            UTF8::ARABIC_LETTER_TEH,
4652288ec7SGreg Roach            UTF8::ARABIC_LETTER_THEH,
4752288ec7SGreg Roach            UTF8::ARABIC_LETTER_JEEM,
4852288ec7SGreg Roach            UTF8::ARABIC_LETTER_HAH,
4952288ec7SGreg Roach            UTF8::ARABIC_LETTER_KHAH,
5052288ec7SGreg Roach            UTF8::ARABIC_LETTER_DAL,
5152288ec7SGreg Roach            UTF8::ARABIC_LETTER_THAL,
5252288ec7SGreg Roach            UTF8::ARABIC_LETTER_REH,
5352288ec7SGreg Roach            UTF8::ARABIC_LETTER_ZAIN,
5452288ec7SGreg Roach            UTF8::ARABIC_LETTER_SEEN,
5552288ec7SGreg Roach            UTF8::ARABIC_LETTER_SHEEN,
5652288ec7SGreg Roach            UTF8::ARABIC_LETTER_SAD,
5752288ec7SGreg Roach            UTF8::ARABIC_LETTER_DAD,
5852288ec7SGreg Roach            UTF8::ARABIC_LETTER_TAH,
5952288ec7SGreg Roach            UTF8::ARABIC_LETTER_ZAH,
6052288ec7SGreg Roach            UTF8::ARABIC_LETTER_AIN,
6152288ec7SGreg Roach            UTF8::ARABIC_LETTER_GHAIN,
6252288ec7SGreg Roach            UTF8::ARABIC_LETTER_FEH,
6352288ec7SGreg Roach            UTF8::ARABIC_LETTER_QAF,
6452288ec7SGreg Roach            UTF8::ARABIC_LETTER_KAF,
6552288ec7SGreg Roach            UTF8::ARABIC_LETTER_LAM,
6652288ec7SGreg Roach            UTF8::ARABIC_LETTER_MEEM,
6752288ec7SGreg Roach            UTF8::ARABIC_LETTER_NOON,
6852288ec7SGreg Roach            UTF8::ARABIC_LETTER_HEH,
6952288ec7SGreg Roach            UTF8::ARABIC_LETTER_WAW,
7052288ec7SGreg Roach            UTF8::ARABIC_LETTER_YEH,
7152288ec7SGreg Roach            UTF8::ARABIC_LETTER_HAMZA,
7252288ec7SGreg Roach            UTF8::ARABIC_LETTER_TEH_MARBUTA,
7352288ec7SGreg Roach            UTF8::ARABIC_LETTER_ALEF_MAKSURA,
7452288ec7SGreg Roach            UTF8::ARABIC_LETTER_WAW,
7552288ec7SGreg Roach        ];
764a9a6095SGreg Roach    }
774a9a6095SGreg Roach
784a9a6095SGreg Roach    /**
794a9a6095SGreg Roach     * Default calendar used by this language.
804a9a6095SGreg Roach     *
814a9a6095SGreg Roach     * @return CalendarInterface
824a9a6095SGreg Roach     */
834a9a6095SGreg Roach    public function calendar(): CalendarInterface
844a9a6095SGreg Roach    {
854a9a6095SGreg Roach        return new ArabicCalendar();
864a9a6095SGreg Roach    }
874a9a6095SGreg Roach
884a9a6095SGreg Roach    /**
8902086832SGreg Roach     * @return LocaleInterface
9002086832SGreg Roach     */
9102086832SGreg Roach    public function locale(): LocaleInterface
9202086832SGreg Roach    {
9302086832SGreg Roach        return new LocaleAr();
9402086832SGreg Roach    }
9502086832SGreg Roach}
96