. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Localization\Locale\LocaleInterface; use Fisharebest\Localization\Locale\LocaleLt; use Illuminate\Database\Query\Builder; /** * Class LanguageLithuanian. */ class LanguageLithuanian extends AbstractModule implements ModuleLanguageInterface { use ModuleLanguageTrait; /** * Phone-book ordering of letters. * * @return array */ public function alphabet(): array { return ['A', 'Ą', 'B', 'C', 'Č', 'D', 'E', 'Ę', 'Ė', 'F', 'G', 'H', 'I', 'Y', 'Į', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'Š', 'T', 'U', 'Ų', 'Ū', 'V', 'Z', 'Ž']; } /** * One of: 'DMY', 'MDY', 'YMD'. * * @return string */ public function dateOrder(): string { return 'YMD'; } /** * @param string $column * @param string $letter * @param Builder $query * * @return void */ public function initialLetterSQL(string $column, string $letter, Builder $query): void { $query->where($column . ' /*! COLLATE utf8_lithuanian_ci */', 'LIKE', '\\' . $letter . '%'); } /** * @return LocaleInterface */ public function locale(): LocaleInterface { return new LocaleLt(); } }