Data Representation and Localization

The browser handles localization. The client browser object model is logically divided into a display ("view") and data ("model") layer. The responsibility for localizing the data values to the user's locale rests with the display layer, not the model layer. All code that retrieves model values and prepares them for display makes use of formatting code, for instance to display dates in the user's preferred fashion. Similarly, all user input is parsed in the context of the current locale to convert the data into the internal format that is stored in the model (and passed to Servlete Container/Java/database).

The internal format for model properties is to use strings (not JavaScript numbers or dates) for everything except boolean values.

The functions that are responsible for converting model data values into localized displayable ones are named convertInternalXYZToLocal(internalValue), while the reverse conversions are named convertLocalXYZToInternal(localValue). Note that latter can fail and include extensive validation, possibly triggering error message alerts.