3

The JFileChooser don't provide support for my language, I'd translate strings defined in the file http://www.rgagnon.com/javadetails/JavaUIDefaults.txt with the UIManager.put(), but I'm not finding the popup strings ("view", "refresh" and "new folder" options when you right-click).

Does anyone know where can I find them to translate?

--update

The FileDialog creates a native dialog, which solves the translation problem, but leads to another question.

--update

Best solution for now: use the system default LAF, so the JFileChooser is system's native dialog and don't need translation. Bad I can't use Nimbus..

Community
  • 1
  • 1
The Student
  • 27,520
  • 68
  • 161
  • 264

2 Answers2

1

Seems to be sun.swing.FilePane that has the Strings, which are then used by javax.swing.plaf.basic.BasicFileChooserUI.

lins314159
  • 2,510
  • 1
  • 16
  • 19
  • God.. yes it is.. and is a sun's internal class.. :( Maybe is more easy to correct the FileDialog problem (see my update) – The Student Mar 19 '10 at 01:04
1

These are the UIManager strings for the JFileChooser context menu. This example is setting them in english.

UIManager.put("FileChooser.detailsViewActionLabelText", "Details");
UIManager.put("FileChooser.listViewActionLabelText", "List");
UIManager.put("FileChooser.viewMenuLabelText", "View");
UIManager.put("FileChooser.refreshActionLabelText", "Refresh"));
UIManager.put("FileChooser.newFolderActionLabelText", "New Folder");
FlexEast
  • 317
  • 2
  • 13