xref: /webtrees/app/Module/LanguageUrdu.php (revision d11be7027e34e3121be11cc025421873364403f9)
13ca31ad9SGreg Roach<?php
23ca31ad9SGreg Roach
33ca31ad9SGreg Roach/**
43ca31ad9SGreg Roach * webtrees: online genealogy
5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
63ca31ad9SGreg Roach * This program is free software: you can redistribute it and/or modify
73ca31ad9SGreg Roach * it under the terms of the GNU General Public License as published by
83ca31ad9SGreg Roach * the Free Software Foundation, either version 3 of the License, or
93ca31ad9SGreg Roach * (at your option) any later version.
103ca31ad9SGreg Roach * This program is distributed in the hope that it will be useful,
113ca31ad9SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
123ca31ad9SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
133ca31ad9SGreg Roach * GNU General Public License for more details.
143ca31ad9SGreg 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/>.
163ca31ad9SGreg Roach */
173ca31ad9SGreg Roach
183ca31ad9SGreg Roachdeclare(strict_types=1);
193ca31ad9SGreg Roach
203ca31ad9SGreg Roachnamespace Fisharebest\Webtrees\Module;
213ca31ad9SGreg Roach
224a9a6095SGreg Roachuse Fisharebest\ExtCalendar\ArabicCalendar;
234a9a6095SGreg Roachuse Fisharebest\ExtCalendar\CalendarInterface;
243ca31ad9SGreg Roachuse Fisharebest\Localization\Locale\LocaleInterface;
253ca31ad9SGreg Roachuse Fisharebest\Localization\Locale\LocaleUr;
263ca31ad9SGreg Roach
273ca31ad9SGreg Roach/**
283ca31ad9SGreg Roach * Class LanguageUrdu.
293ca31ad9SGreg Roach */
303ca31ad9SGreg Roachclass LanguageUrdu extends AbstractModule implements ModuleLanguageInterface
313ca31ad9SGreg Roach{
323ca31ad9SGreg Roach    use ModuleLanguageTrait;
333ca31ad9SGreg Roach
343ca31ad9SGreg 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 ArabicCalendar();
524a9a6095SGreg Roach    }
534a9a6095SGreg Roach
544a9a6095SGreg Roach    /**
553ca31ad9SGreg Roach     * Should this module be enabled when it is first installed?
563ca31ad9SGreg Roach     *
573ca31ad9SGreg Roach     * @return bool
583ca31ad9SGreg Roach     */
593ca31ad9SGreg Roach    public function isEnabledByDefault(): bool
603ca31ad9SGreg Roach    {
613ca31ad9SGreg Roach        return false;
623ca31ad9SGreg Roach    }
633ca31ad9SGreg Roach
643ca31ad9SGreg Roach    /**
653ca31ad9SGreg Roach     * @return LocaleInterface
663ca31ad9SGreg Roach     */
673ca31ad9SGreg Roach    public function locale(): LocaleInterface
683ca31ad9SGreg Roach    {
693ca31ad9SGreg Roach        return new LocaleUr();
703ca31ad9SGreg Roach    }
713ca31ad9SGreg Roach}
72