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 can't handle Chinese, causing the post to fail to add #16

Closed
ivoth opened this issue Mar 22, 2018 · 4 comments
Closed

str_slug can't handle Chinese, causing the post to fail to add #16

ivoth opened this issue Mar 22, 2018 · 4 comments
Assignees

Comments

@ivoth
Copy link

ivoth commented Mar 22, 2018

_20180322194359
The slug field cannot be null, resulting in an article adding the second Chinese title.

@guillaumebriday
Copy link
Owner

🤔 I think the str_slug can't handle non ascii characters.

https://github.com/laravel/framework/blob/5.6/src/Illuminate/Support/Str.php#L418

Can you make a PR to fix it ?

Thanks

@ivoth
Copy link
Author

ivoth commented Mar 23, 2018

This processing of Chinese needs to convert third-party translation APIs to English for use as URLs.
Now I can only temporarily id as a slug field.

I want to use this ID when slug is empty when I generate the url, but I can't seem to find it. please help me.
Thanks

@ivoth
Copy link
Author

ivoth commented Apr 30, 2018

It is recommended to add the slug field to the form, but it is optional. If it is not filled, it is automatically generated so that it is compatible with Chinese.

@guillaumebriday
Copy link
Owner

Seems cool. I did the same behaviour with the media library and the name of images.

I put it on the roadmap

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

No branches or pull requests

2 participants