Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Str::slug() not working with other characters aside english #29835

Closed
GabMic opened this issue Sep 3, 2019 · 5 comments
Closed

Str::slug() not working with other characters aside english #29835

GabMic opened this issue Sep 3, 2019 · 5 comments

Comments

@GabMic
Copy link
Contributor

GabMic commented Sep 3, 2019

  • Laravel Version: 5.8.34
  • PHP Version: 7.2.11

Description:

I am trying to use Str::slug() with another language than English(Hebrew in my case), but it is not working.
while $request->title is in Hebrew, the following will not return anything:
Str::slug($request->title);
But with English, it will.

I have also tried this form, but also not working:
Str::slug($request->title, '-', 'he');

Steps To Reproduce:

Just send a Hebrew sentence to Str::slug();

An example sentence(actually says 'this is a system test'):

זה ניסיון מערכת

Thanks for the help.

@driesvints
Copy link
Member

Think we need to add those characters here: https://github.com/laravel/framework/blob/5.8/src/Illuminate/Support/Str.php#L737-L763

If you could send in a PR, that'd be great. Don't speak Hebrew myself 😅

@driesvints
Copy link
Member

Also: 8.3.4 isn't a Laravel release. Did you mean a different version?

@GabMic
Copy link
Contributor Author

GabMic commented Sep 3, 2019

Also: 8.3.4 isn't a Laravel release. Did you mean a different version?

Oh, haha i have updated the version.

@GabMic
Copy link
Contributor Author

GabMic commented Sep 3, 2019

Think we need to add those characters here: https://github.com/laravel/framework/blob/5.8/src/Illuminate/Support/Str.php#L737-L763

If you could send in a PR, that'd be great. Don't speak Hebrew myself 😅

I will try it right now.

@GabMic
Copy link
Contributor Author

GabMic commented Sep 3, 2019

Added this pull request:
#29838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants