Question

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..

Was it helpful?

Solution

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

OTHER TIPS

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");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top