The CDEJ is internationalized in many ways. Not only are text elements separated out to standard Java properties files, but other elements are also localized automatically:
- All CDEJ plug-in classes of all types expose the locale and time zone of the active user through the getLocale and getTimeZone methods. The active user is the user who initiated the request for the HTML page currently being rendered on the web container's request service thread. The widget developer can access this information and use it as required.
- Locale-aware sort orders are supported by special locale-aware versions of the comparator plug-ins provided with the CDEJ. These use Java's Collator API, but can be overridden to support custom sorting rules if required.
- Locales can be define both the language and the country and the CDEJ uses this information to support spelling variations of the same language in different countries.
- The converter plug-ins for numeric values automatically apply the rules of the active user's locale when formatting or parsing numbers, ensuring that decimal points and grouping separators are presented or handled appropriately. For date values, similarly, non-numeric months names are translated as appropriate.
In general, there is no need to specify the locale when accessing the CDEJ rendering API, as the locale is automatically determined and applied when necessary. Some types of plug-ins, particularly the converter plug-ins described in the Cúram Web Client Reference Manual, need to handle the locale carefully, but this is generally not the case for renderer plug-ins. When renderer plug-ins resolve paths to their values, the values are provided via the converter plug-ins, or other locale-aware sources, and the localization will happen automatically before the value is returned.