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

Slug in Chinese title #36

Closed
shavenking opened this issue Jul 12, 2016 · 4 comments
Closed

Slug in Chinese title #36

shavenking opened this issue Jul 12, 2016 · 4 comments

Comments

@shavenking
Copy link

Hi

Post's slug is generated by str_slug, which is a problem when users have Chinese title. Is there any idea to solve it?

@austintoddj
Copy link
Owner

@shavenking Thanks for bringing this up. Let me dig into this and get back to you as soon as I know more about how to implement a solution.

@padarom
Copy link
Contributor

padarom commented Jul 13, 2016

I only know some Japanese, but when looking at other packages for Chinese, this looks like something that could work as a replacement: https://github.com/lokielse/laravel-pinyin

In fact, every language that doesn't use Latin has problems with slugs. Not all of them are too common obviously, but this page alone lists 23 different alphabets. So when adding a way to solve this automatically for Chinese, the same probably has to be done for other alphabets (like Japanese, Korean, Cyrillic, Arabic, Hebrew, ...).

The most fool-proof way (though not the cleanest considering UX) is probably to suggest a slug from the title, but give the user the possibility to override this.

@austintoddj
Copy link
Owner

Good thought @padarom. I'll take a look into this package and see what we can do to get this into a release.

@austintoddj
Copy link
Owner

Let's go with the solution @padarom suggested. Letting a user change the slug of the post should fix this bug. I'll close this out and open a new feature issue.

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