0

I'm developing a desktop application with Swing for an unsupported language.

I have my own properties file. I'm using it for the messages in the application. I also call setLocale() method of the JCalendar with my file. But since I don't know which keywords to use for months, month selection inside the JCalendar shows English named months.

For example, I tried:

january=translatedJanuary
february=translatedFebruary

I couldn't find a tutorial or form to fill to create a locale (properties) file. Is there one? Or is it still impossible for JCalendar to get words from properties file. Or simply, what is the necessary keywords?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Null Pointer
  • 344
  • 1
  • 2
  • 11

1 Answers1

1

Looking at the source of the initNames() method in JCalendar's JMonthChooser class, we see:

DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);
String[] monthNames = dateFormatSymbols.getMonths();

So, you can't override the names with your own ResourceBundle entries. The best you can do is hope that Java SE defines month names for the locale you pass to setLocale.

VGR
  • 40,506
  • 4
  • 48
  • 63