#140 PeriodFormat.wordBased does not work with english

closed
Joda-Time (76)
5
2012-10-08
2012-01-09
r.loitzenbauer
No

If you're having a german JVM for example the resource bundle resolving mechanism does not resolve english correctly.

PeriodFormatter periodFormatter = PeriodFormat.wordBased(Locale.ENGLISH);
String periodAsString = periodFormatter.print(new Period(1, 1, 1, 0));
System.out.println(periodAsString);

In this case the german output is returned instead of the english one, because the resourcebundle messages.properties is not correctly resolved. Resolving the French locale from messages_fr.properties for example works as expected.

Discussion

  • Added empty message_en.proerties to fix the problem