Eclipse extracts all strings of class files for internationalization [externalize strings... function]

Source: Internet
Author: User

------------ Begin -----------------------

1. first, you can press the shortcut key ALT + SHIFT + S and then select the bottom Externalize Strings... option/or right-click the code of a class file --> Source --> Externalize Strings... option

-------------------------------

2. Click it to search all the strings in your class.

: Find the Key under the item is corresponding to your package generated. Value is a string.

Here, if you want to internationalize to Chinese, you can directly edit it (click the item of Value) without converting it to Unicode (automatic conversion)

If you do not want to internationalize a String, you can deselect the check box.

Suggestion: Do not write Chinese to make it international. Otherwise, it will overwrite the original English. after the file is generated, use another plug-in (search for the International Editor ).

--------------------

Click Next -- Finish. At this time, two files will be generated (under the same package as the class)

Message. java (no changes required) and messages. properties

Messages. properties is an international file.

---------------------

Possible concerns:

1. A Message. java and messages. properties files are generated for a class to be internationalized,

Will it generate another class and file? Or overwrite the previous messages. properties directly?

A: No. It will be appended to the end of the messages. properties file. If there is no messages. properties file,.

 

2. What should I do if I want to internationalize several files at a time?

A: I don't know... I haven't found any related operations. I hope you can give me some advice ......

Related Article

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.