. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Localization\Locale\LocaleInterface; use Fisharebest\Localization\Locale\LocaleSv; use Illuminate\Database\Query\Builder; /** * Class LanguageSwedish. */ class LanguageSwedish 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', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'Å', 'Ä', 'Ö']; } /** * @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_swedish_ci */', 'LIKE', '\\' . $letter . '%'); } /** * @return LocaleInterface */ public function locale(): LocaleInterface { return new LocaleSv(); } }