diff --git a/src/helpers.php b/src/helpers.php index 1b047a3..8758a3b 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -125,17 +125,64 @@ function carbon(DateTimeInterface | string | null $parseString = '', ?string $tz function translit_to_ua(string $text): string { $alphabet = [ - 'a' => 'а', 'b' => 'б', 'v' => 'в', 'g' => 'г', 'd' => 'д', 'e' => 'е', 'yo' => 'ё', - 'j' => 'ж', 'z' => 'з', 'i' => 'и', 'i' => 'й', 'k' => 'к', 'l' => 'л', 'm' => 'м', - 'n' => 'н', 'o' => 'о', 'p' => 'п', 'r' => 'р', 's' => 'с', 't' => 'т', 'y' => 'у', - 'f' => 'ф', 'h' => 'х', 'c' => 'ц', 'ch' => 'ч', 'sh' => 'ш', 'sh' => 'щ', 'i' => 'ы', - 'e' => 'е', 'u' => 'у', 'ya' => 'я', 'A' => 'А', 'B' => 'Б', 'V' => 'В', 'G' => 'Г', - 'D' => 'Д', 'E' => 'Е', 'Yo' => 'Ё', 'J' => 'Ж', 'Z' => 'З', 'I' => 'И', 'I' => 'Й', - 'K' => 'К', 'L' => 'Л', 'M' => 'М', 'N' => 'Н', 'O' => 'О', 'P' => 'П', 'R' => 'Р', - 'S' => 'С', 'T' => 'Т', 'Y' => 'Ю', 'F' => 'Ф', 'H' => 'Х', 'C' => 'Ц', 'Ch' => 'Ч', - 'Sh' => 'Ш', 'Sh' => 'Щ', 'I' => 'Ы', 'E' => 'Е', 'U' => 'У', 'Ya' => 'Я', '\'' => 'ь', - '\'' => 'Ь', '\'\'' => 'ъ', '\'\'' => 'Ъ', 'j' => 'ї', 'i' => 'и', 'g' => 'ґ', - 'ye' => 'є', 'J' => 'Ї', 'I' => 'І', 'G' => 'Ґ', 'YE' => 'Є', + 'a' => 'а', + 'b' => 'б', + 'v' => 'в', + 'g' => 'г', + 'd' => 'д', + 'e' => 'е', + 'yo' => 'ё', + 'j' => 'ж', + 'z' => 'з', + 'i' => 'и', + 'k' => 'к', + 'l' => 'л', + 'm' => 'м', + 'n' => 'н', + 'o' => 'о', + 'p' => 'п', + 'r' => 'р', + 's' => 'с', + 't' => 'т', + 'y' => 'у', + 'f' => 'ф', + 'h' => 'х', + 'c' => 'ц', + 'ch' => 'ч', + 'sh' => 'ш', + 'u' => 'у', + 'ya' => 'я', + 'A' => 'А', + 'B' => 'Б', + 'V' => 'В', + 'G' => 'Г', + 'D' => 'Д', + 'E' => 'Е', + 'Yo' => 'Ё', + 'J' => 'Ж', + 'Z' => 'З', + 'I' => 'И', + 'K' => 'К', + 'L' => 'Л', + 'M' => 'М', + 'N' => 'Н', + 'O' => 'О', + 'P' => 'П', + 'R' => 'Р', + 'S' => 'С', + 'T' => 'Т', + 'Y' => 'Ю', + 'F' => 'Ф', + 'H' => 'Х', + 'C' => 'Ц', + 'Ch' => 'Ч', + 'Sh' => 'Ш', + 'U' => 'У', + 'Ya' => 'Я', + '\'' => 'ь', + '\'\'' => 'ъ', + 'ye' => 'є', + 'YE' => 'Є', ]; return str_ireplace(