|
How to localize data formats (numberformat etc) |
The user interfacing framework uses instances of to convert the internal representation of data to strings in the user interface, and back. You can override the formats used by all stringconverters in all applications in the class StingConverter in the root classFolder. Or you can copy this class to an application classFolder to override it for that application only. For an example of the last, see example 10.
To override the stringconverters used for a specific page or part you can override the getStingConverter method. You probably first need to subclass the page or part class, see how to specialize a part of a page. Then you can instantiate a specific StringConverter subclass in the overriding method. It will also be used by all parts of the page or part.
On the StringConverter you can not only override data formats, but also override the conversion methods themselves, so that you can convert to/from yet unsupported data formats. You can even extend it to convert yet unsupported datatypes. However, the will only accept those datatypes if they are classes.
The internal data formats are defined by . They need to be compatible with php's automatic type conversion, so there is little room for choice. If you override one of them you will probably have to override the conversions done by your QueryHandler too. For more information in customizing the QueryHandler, see how to use multiple databases. |
|