String Processing problems en (Chinese) en (English) ja (Japanese) and above strings, if the language is zh, "Chinese" is displayed. if the language is en, "English" is displayed. if the language is ja, "Japanese" is displayed. how can I implement this function? ------ solution --------------------...... not finished yet? I remember, didn't you solve this problem? What is display in Japanese? Show Japanese? Or is the Chinese word "Japanese" displayed? ------ Solve the problem of string processing
En (Chinese) en (English) ja (Japanese)
The above string,
If the language is zh, "Chinese" is displayed"
If the language is en, "English" is displayed"
If the language is ja, "Japanese" is displayed"
How can this function be implemented?
------ Solution --------------------
... Isn't it done?
I remember, didn't you solve this problem? What is display in Japanese? Show Japanese? Or is the Chinese word "Japanese" displayed?
------ Solution --------------------
I have not verified this method. However, you have added a regex website to your favorites for sharing.
See http://www.regular-expressions.info/unicode.html.
You can try regular expressions. for example, the encoding range of Chinese characters is U + 4E00 .. U + 9FFF,
Another stupid way is to use GOOGLE's translation API to determine the language of the text.