Klaus Heywinkel
Klaus Heywinkel

Reputation: 509

Codenameone: Short Weekdays cannot be localised in a Picker with Type DateTime

I'm not able to localise the short Weekdays in a Picker with type DateTime which uses the lighweight-Component.

In the ResourceBundle I added the translations for Short-Month and Short-Weekday:

MONTH_SHORTNAME_JANUARY
etc.

resp.

WEEKDAY_SHORTNAME_MONDAY
etc.

The short monthnames are used in the Picker with the Simulator - the short weekdays not. On an iPad neither the short monthnames nor the short weekdays are used. On an Android-Device it looks like in the Simulator.

I think the reason is, that the instance of SimpleDateFormat, which is created in the DateModelAdapter in Spinner3D, does not set the resourceBundle in its instance of DateFormatSymbols. Therefore the translations I added are not used.

I attached 2 Screenshots: First a Screenshot from the iPad - second a Screenshot from the Simulator.

Screenshot from the iPad Screenshot from the Simulator

Am I right or do I miss something?

Upvotes: 1

Views: 55

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

Try the resource bundle strings: Calendar.Sun, Calendar.Mon etc...

From looking at the code I think those should work.

Upvotes: 0

Related Questions