0

So, I can manage translating strings that I've created, however, I'm having trouble with strings incorporated into swing elements like e.g. JFileChooser or a message that pops up when file rename fails in JFileChooser.

I also use several L&F (user can switch them). I have been hearing two different things: that key for the strings I want to change are L&F specific and that they aren't...

So, in case they are, could somebody tell me where are they located in Nimbus L&F (I have it's source files) so I can change them to "universal key" (which I will do for all L&Fs) so I don't have to write different code for each and every look and feel.

It would also be nice I somebody would explain to me how can I then turn all that .java files in to my own L&F (e.g. Nimbus Custom) which would be importable into my program.

In case they are, in fact, L&F independent, would somebody provide me with some info on where can I access them and how to change them. Link to full list of the string that are actually painted onto components would be great too.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Ivan Karlovic
  • 221
  • 5
  • 14
  • Most widgets have ways of changing their built-in text. JFileChooser, for example, has [`setTitleDialog()`](http://docs.oracle.com/javase/7/docs/api/javax/swing/JFileChooser.html#setDialogTitle(java.lang.String)). – Roddy of the Frozen Peas Sep 15 '12 at 13:02
  • Yeah, but what about filename text, filetype text, tooltip text on it's icons? – Ivan Karlovic Sep 15 '12 at 13:33
  • 1
    It should be pulling those values (filename, filetype, tooltip) from the system itself. If the user's OS is running English, it'll show in English. If the OS is in Spanish, it'll show in Spanish. Some of the file type text can be changed through the use of [`FileFilter`](http://docs.oracle.com/javase/7/docs/api/javax/swing/filechooser/FileFilter.html)s. – Roddy of the Frozen Peas Sep 15 '12 at 15:29
  • Yeah, but I don't indend to translate my program to e.g. spanish (just english and my native language), and I'd like to give my users a choice... – Ivan Karlovic Sep 15 '12 at 15:41

0 Answers0