<Swing Dev> Translating JFileChooser as per the logged in language

Pavel Porvatov pavel.porvatov at oracle.com
Tue Jan 24 10:59:45 UTC 2012


Hi Radhika,

You should put localized resources into UIManager. For example, to 
localize open button use something like the following:
UIManager.put("FileChooser.openButtonText", "Some text for the Open button")

There are lot of examples in the Internet, e.g. take a look here:
http://stackoverflow.com/questions/3671868/how-can-i-add-localization-to-jfilechooser-for-a-locale-that-is-not-supported-by

Regards, Pavel
> Hello All,
> We are developing an application in which the user can login in 
> different languages.
> We are using JFileChooser in the application. I find that the 
> JFileChooser is displayed in the language of the locale than the 
> logged in language.
> Is there a way to change the UI properties of JFileChooser as per the 
> logged in language even though the locale is same?
> Please let me know.
> Thanks in advance.
> Regards,
> Radhika

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20120124/6afc34a0/attachment.html>


More information about the swing-dev mailing list