File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Internationalization: Select language from combo box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Internationalization: Select language from combo box" Watch "Internationalization: Select language from combo box" New topic
Author

Internationalization: Select language from combo box

alejandro garcia
Greenhorn

Joined: Aug 11, 2007
Posts: 10
Hi, I'm trying to make the user select the language of a very simple menu.
I post here the 2 classes: Menus and Selector.
In the Menus class, there are 2 items: File and Help
When you click on File then you select Configuration, and it shows the Selector class which is only a ComboBox, where you select the Language.

The Menus class is in part internationalized because I defined a Resources.properties file with this pairs:

TITLE=Internationalization!
FILE=File
HELP=Help
OPEN=Open
CONFIGURATION=Configuration

So that's first step is done, and it works fine, now I need the end user to select the language in the Configuration combo box and on the fly load TITLE, FILE,HELP,OPEN and CONFIGIRATION from an appropiate Resourses_es_ESP.properties file that I've already created, if for example he selects Spanish, that properties file has this pairs:
TITLE=Internationacionalizacion
FILE=Archivo
HELP= Ayuda
OPEN=Abrir
CONFIGURATION=Configuracion.

Any help please?

Here is the menu class just to select the Configuration option:




And here is the selector it's just a combo box to select the language

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Internationalization: Select language from combo box
 
Similar Threads
almost working: change string labels of whole application
getSelectedItem() selects nothing
Whatz the problem
change string labels of a whole application
How to set color of scrollbar in scrollpane?