-
Notifications
You must be signed in to change notification settings - Fork 249
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
Chinese support #47
Comments
You just need to add the corresponding rules. |
would be interested in this too, how would you go about it? @dmyers did you manage it? |
I have little to no knowledge about Chinese, but as far as I understand that Chinese doesn't really have what we call letters. That is, you cannot really transliterate a Chinese symbol into an ASCII character (or a series of characters), because Chinese characters are basically words (or at least part of words). Again I'm not 100% sure. Take a look at FaSlugify (which seems to be based on this library for Farsi/Persian. This project includes another project called finglify which translates a Persian/Farsi word into latin characters. It includes a massive list of words. I guess that a Slugify for Chinese would also need such a list. |
I have solved it kind of...
This adds rules for Hebrew and in case of Chinese it does transliterate but you have to send 'zh' $locale flag to the function. Also update your composer and add:
|
|
Interesting question for I will sooner or later need this. After some research I have found this solution: http://pastebin.com/zZfci0Dz. The URL won't look nice but it is re-translatable from UTF-8 to Chinese without a loss. There are easier solutions but they are not reliable and even dangerous. Read this first reply to understand why: http://stackoverflow.com/questions/5998607/conversion-from-simplified-to-traditional-chinese. You could run into problems. Something better to avoid as a web-designer. Use numbered url's instead. |
echo empty, should be unchanged string '中文'. |
+1 for the addition of the Chinese/pinyin |
In order to make it Chinese/pinyin just modify Chinese string with $str = transliterator_transliterate('Any-Latin', $str); don't forget php requires "ext-intl": "*", |
I suppose it could be easy to implement using a class like this as an addon: https://github.com/jifei/Pinyin/blob/master/Pinyin.php |
Added Chinese support (pinyin): #158 |
#158 PR still not approved -- any progress? Thanks! |
I don't know why checks are not successful, but it works: https://getsongbpm.com/artist/zhoujie/3vJn |
Fixed by #195 |
Is there a way to get Chinese characters to work?
The text was updated successfully, but these errors were encountered: