V
V
vs-vs2021-03-05 02:17:19
Laravel
vs-vs, 2021-03-05 02:17:19

How to set up transliteration in Laravel?

Hello.
The problem is this, on the LAN in Laravel they set up transliteration for cnc and everything works.
i - ya
d - i, etc.

We do the translation this way,
Str::slug('ая' '-', 'ru');

but when uploading to the server, it translates differently
i - ja
d - j, etc.

What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2021-03-05
@Sanasol

a different version of laravel (internal dependencies) is installed for example if you do not use composer.lock
If you use the internal str_slug for this.
Though nothing seems to have changed for a couple of years.
up half a year ago they changed ja to ya.
if the project is more than six months old, then it's definitely in the version of the packages installed.
https://github.com/voku/portable-ascii/commit/7e3b...

V
Vladimir Kokhan, 2021-03-05
@SkazochNick

Here is a good package for generating slugs
https://github.com/cviebrock/eloquent-sluggable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question