Skip navigation links

Package com.codename1.l10n

The Localization API allows developers to adapt their applications to different geographic locales and conventions.

See: Description

Package com.codename1.l10n Description

The Localization API allows developers to adapt their applications to different geographic locales and conventions.

Portable Localization

Most of the classes within this package are clones of Java SE classes such as SimpleDateFormat vs. SimpleDateFormat. The main motivation of placing these classes here and using the cloned version is portability.

If we would use SimpleDateFormat its behavior would be slightly different on Android or in the simulator vs. its behavior on iOS. That is because the implementation would be radically different. When you use SimpleDateFormat the implementation might be missing some pieces but it would be more consistent with the implementation you would get on the device which is always preferable.

L10NManager

The localization manager allows adapting values for display in different locales thru parsing and formatting capabilities (similar to JavaSE's DateFormat/NumberFormat). It also includes language/locale/currency related API's similar to Locale/currency API's from JavaSE.
The sample code below just lists the various capabilities of the API:

Localization formatting/parsing and information
Skip navigation links

Copyright © 2023. All rights reserved.