Here is a use case of simple GUI being Internationalized.
Open a new project with JFrame form added. (you can do this by right clicking on the project node then New and selecting JFrame Form).
I created a simple GUI to demonstrate the steps.

Now right click on project node and go to New->Other->Other->Properties.
Name it Bundle. Add the following contents to that file.

Now you need to set the name of the respective component by right clicking and editing. Note that the name must be similar to what you have written in Bundles file.
Open the UI class in the design mode. Right click on Form node->Properties.
You should see a window like this.

Check Automatic Internationalization. Click on ellipsis(..) to select the desired locale. I have chosen French(fr_FR). Right click on Bundle.properties and open it. You should see something similar to this,

Save it.Go to Design mode window(Editor Window). Now in the navigator window right click on the Form option and Reload.
Right click on the project name node, Goto properties->Run then enter this
"-Duser.language=fr -Duser.country=FR" (Without Quotes)
in the Virtual Machine Argument TextField and run the project.You must see your GUI Internationalized.

Howz That now......
No comments:
Post a Comment