String Processing problems

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.