102086832SGreg Roach<?php 23976b470SGreg Roach 302086832SGreg Roach/** 402086832SGreg Roach * webtrees: online genealogy 55bfc6897SGreg Roach * Copyright (C) 2022 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 2202086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleInterface; 2302086832SGreg Roachuse Fisharebest\Localization\Locale\LocaleLt; 24*52288ec7SGreg Roachuse Fisharebest\Webtrees\Encodings\UTF8; 254a9a6095SGreg Roachuse Illuminate\Database\Query\Builder; 2602086832SGreg Roach 2702086832SGreg Roach/** 2802086832SGreg Roach * Class LanguageLithuanian. 2902086832SGreg Roach */ 3002086832SGreg Roachclass LanguageLithuanian 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 { 41*52288ec7SGreg Roach return [ 42*52288ec7SGreg Roach 'A', 43*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_A_WITH_OGONEK, 44*52288ec7SGreg Roach 'B', 45*52288ec7SGreg Roach 'C', 46*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON, 47*52288ec7SGreg Roach 'D', 48*52288ec7SGreg Roach 'E', 49*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_E_WITH_OGONEK, 50*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_E_WITH_DOT_ABOVE, 51*52288ec7SGreg Roach 'F', 52*52288ec7SGreg Roach 'G', 53*52288ec7SGreg Roach 'H', 54*52288ec7SGreg Roach 'I', 55*52288ec7SGreg Roach 'Y', 56*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_I_WITH_OGONEK, 57*52288ec7SGreg Roach 'J', 58*52288ec7SGreg Roach 'K', 59*52288ec7SGreg Roach 'L', 60*52288ec7SGreg Roach 'M', 61*52288ec7SGreg Roach 'N', 62*52288ec7SGreg Roach 'O', 63*52288ec7SGreg Roach 'P', 64*52288ec7SGreg Roach 'R', 65*52288ec7SGreg Roach 'S', 66*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_S_WITH_CARON, 67*52288ec7SGreg Roach 'T', 68*52288ec7SGreg Roach 'U', 69*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_U_WITH_OGONEK, 70*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_U_WITH_MACRON, 71*52288ec7SGreg Roach 'V', 72*52288ec7SGreg Roach 'Z', 73*52288ec7SGreg Roach UTF8::LATIN_CAPITAL_LETTER_Z_WITH_CARON, 74*52288ec7SGreg Roach ]; 754a9a6095SGreg Roach } 764a9a6095SGreg Roach 774a9a6095SGreg Roach /** 784a9a6095SGreg Roach * One of: 'DMY', 'MDY', 'YMD'. 794a9a6095SGreg Roach * 804a9a6095SGreg Roach * @return string 814a9a6095SGreg Roach */ 824a9a6095SGreg Roach public function dateOrder(): string 834a9a6095SGreg Roach { 844a9a6095SGreg Roach return 'YMD'; 854a9a6095SGreg Roach } 864a9a6095SGreg Roach 874a9a6095SGreg Roach /** 8802086832SGreg Roach * @return LocaleInterface 8902086832SGreg Roach */ 9002086832SGreg Roach public function locale(): LocaleInterface 9102086832SGreg Roach { 9202086832SGreg Roach return new LocaleLt(); 9302086832SGreg Roach } 94*52288ec7SGreg Roach 95*52288ec7SGreg Roach 96*52288ec7SGreg Roach /** 97*52288ec7SGreg Roach * Letters with diacritics that are considered distinct letters in this language. 98*52288ec7SGreg Roach * 99*52288ec7SGreg Roach * @return array<string,string> 100*52288ec7SGreg Roach */ 101*52288ec7SGreg Roach protected function normalizeExceptions(): array 102*52288ec7SGreg Roach { 103*52288ec7SGreg Roach return [ 104*52288ec7SGreg Roach 'A' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_A_WITH_OGONEK, 105*52288ec7SGreg Roach 'C' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON, 106*52288ec7SGreg Roach 'E' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_E_WITH_OGONEK, 107*52288ec7SGreg Roach 'E' . UTF8::COMBINING_DOT_ABOVE => UTF8::LATIN_CAPITAL_LETTER_E_WITH_DOT_ABOVE, 108*52288ec7SGreg Roach 'I' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_I_WITH_OGONEK, 109*52288ec7SGreg Roach 'S' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_S_WITH_CARON, 110*52288ec7SGreg Roach 'U' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_U_WITH_OGONEK, 111*52288ec7SGreg Roach 'U' . UTF8::COMBINING_MACRON => UTF8::LATIN_CAPITAL_LETTER_U_WITH_MACRON, 112*52288ec7SGreg Roach 'Z' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_Z_WITH_CARON, 113*52288ec7SGreg Roach 'a' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_A_WITH_OGONEK, 114*52288ec7SGreg Roach 'c' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_C_WITH_CARON, 115*52288ec7SGreg Roach 'e' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_E_WITH_OGONEK, 116*52288ec7SGreg Roach 'e' . UTF8::COMBINING_DOT_ABOVE => UTF8::LATIN_CAPITAL_LETTER_E_WITH_DOT_ABOVE, 117*52288ec7SGreg Roach 'i' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_I_WITH_OGONEK, 118*52288ec7SGreg Roach 's' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_S_WITH_CARON, 119*52288ec7SGreg Roach 'u' . UTF8::COMBINING_OGONEK => UTF8::LATIN_CAPITAL_LETTER_U_WITH_OGONEK, 120*52288ec7SGreg Roach 'u' . UTF8::COMBINING_MACRON => UTF8::LATIN_CAPITAL_LETTER_U_WITH_MACRON, 121*52288ec7SGreg Roach 'z' . UTF8::COMBINING_CARON => UTF8::LATIN_CAPITAL_LETTER_Z_WITH_CARON, 122*52288ec7SGreg Roach ]; 123*52288ec7SGreg Roach } 12402086832SGreg Roach} 125