|
Project Information
|
This module provides subclasses to fieldtypes of the sapphire framework used by SilverStripe CMS. These classes give access to more options for price & date formating which sapphire in the current state lacks. it supports:
Why this module?SilverStripe and the sapphire Framework lack in the current state full support for I18n of Money and Date types. It also doesnt have one clear way for these Issues, it provides the Zend way or the pure PHP way. But both without full implementation or full access to config options for specific formating of these data types. Examples:Date Formating i18n::set_locale('de_DE');the PHP way: A common way in SS was to use $Datetime.FormatI18N(%e. %B %G). It also expected a PHP locale that had to be set additional to i18n::set_locale('de_DE');like: setlocale (LC_TIME, 'de_DE@euro', 'de_DE.UTF-8', 'de_DE', 'de', 'ge'); You can now also use the Date Formating the Zend way: This is also independent from the PHP locale and works soly through: i18n::set_default_locale('de_DE');or i18n::set_locale('de_DE');Money formating Payment::set_site_currency('EUR');via the Currency Class (deprecated): pure SS: €1233.45 (f.e. in Germany it would be expected to be: €1.233,45 even better is to use the Zend way: This gives full access to options of the powerful Money resp. Zend Currency Class: with IF: 1.233,45 EUR or €1.233,45 EUR or EUR1.233,45 etc. This module allows also total customization throught static setters. ZendDate::setFormatNice('d D M y');So if you like to do fancy formating like "@12?233!00 EUR" or "2010, März Freitag 12. Nachm." |