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\ExtCalendar\ArabicCalendar; 23use Fisharebest\ExtCalendar\CalendarInterface; 24use Fisharebest\Localization\Locale\LocaleFa; 25use Fisharebest\Localization\Locale\LocaleInterface; 26use Fisharebest\Webtrees\Encodings\UTF8; 27use Illuminate\Database\Query\Builder; 28 29/** 30 * Class LanguageFarsi. 31 */ 32class LanguageFarsi extends AbstractModule implements ModuleLanguageInterface 33{ 34 use ModuleLanguageTrait; 35 36 /** 37 * Phone-book ordering of letters. 38 * 39 * @return array<int,string> 40 */ 41 public function alphabet(): array 42 { 43 return [ 44 UTF8::ARABIC_LETTER_ALEF, 45 UTF8::ARABIC_LETTER_BEH, 46 UTF8::ARABIC_LETTER_TEH, 47 UTF8::ARABIC_LETTER_THEH, 48 UTF8::ARABIC_LETTER_JEEM, 49 UTF8::ARABIC_LETTER_HAH, 50 UTF8::ARABIC_LETTER_KHAH, 51 UTF8::ARABIC_LETTER_DAL, 52 UTF8::ARABIC_LETTER_THAL, 53 UTF8::ARABIC_LETTER_REH, 54 UTF8::ARABIC_LETTER_ZAIN, 55 UTF8::ARABIC_LETTER_SEEN, 56 UTF8::ARABIC_LETTER_SHEEN, 57 UTF8::ARABIC_LETTER_SAD, 58 UTF8::ARABIC_LETTER_DAD, 59 UTF8::ARABIC_LETTER_TAH, 60 UTF8::ARABIC_LETTER_ZAH, 61 UTF8::ARABIC_LETTER_AIN, 62 UTF8::ARABIC_LETTER_GHAIN, 63 UTF8::ARABIC_LETTER_FEH, 64 UTF8::ARABIC_LETTER_QAF, 65 UTF8::ARABIC_LETTER_KAF, 66 UTF8::ARABIC_LETTER_LAM, 67 UTF8::ARABIC_LETTER_MEEM, 68 UTF8::ARABIC_LETTER_NOON, 69 UTF8::ARABIC_LETTER_HEH, 70 UTF8::ARABIC_LETTER_WAW, 71 UTF8::ARABIC_LETTER_YEH, 72 UTF8::ARABIC_LETTER_HAMZA, 73 UTF8::ARABIC_LETTER_TEH_MARBUTA, 74 UTF8::ARABIC_LETTER_ALEF_MAKSURA, 75 UTF8::ARABIC_LETTER_WAW, 76 ]; 77 } 78 79 /** 80 * Default calendar used by this language. 81 * 82 * @return CalendarInterface 83 */ 84 public function calendar(): CalendarInterface 85 { 86 return new ArabicCalendar(); 87 } 88 89 /** 90 * Should this module be enabled when it is first installed? 91 * 92 * @return bool 93 */ 94 public function isEnabledByDefault(): bool 95 { 96 return false; 97 } 98 99 /** 100 * @return LocaleInterface 101 */ 102 public function locale(): LocaleInterface 103 { 104 return new LocaleFa(); 105 } 106} 107