-
Notifications
You must be signed in to change notification settings - Fork 250
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
Slugify not working with chinese characters #205
Comments
Also for me Trying to translate any Chinese string, the result is always an empty string. |
I just noticed one interesting thing... $slugify->slugify('活动日起'); It returns an empty string, but... $slugify->activateRuleSet('chinese')
->slugify('活动日起'); It correctly returns huodongriqi that is the expected output. I therefore think that there is a problem with the automatic detection of Chinese. The string is not recognized and therefore the output is not provided. |
Ok @yelnyaface this is not a bug. The documentation expressly states that, for obvious reasons, not all rules are active by default, because conflicts would arise. It is therefore right that the Chinese must be activated before it is used. |
yes, but it is hard to know when to expect chinese characters
is there some way to detect the charset so |
I think you could use $slugify->activateRuleSet(['default', 'german', 'chinese'])
->slugify('活动日起'); specifying all yout activable languages and their ordering |
i tried $slugify->slugify('活动日起');
but it always return ""
how can I convert it into pinyin?
The text was updated successfully, but these errors were encountered: