17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1985 Views |
-
Better US Localization

4 November 2008 at 11:15am Last edited: 4 November 2008 11:17am
Since I'm in the United States, I made some heavy changes to the core of SilverStripe and the Ecommerce module. In Silverstripe, I changed practically all references of Surname to Last name. In the Ecommerce module, I added support for State and Zip Codes. Linked are the results of my work. Thanks!
US-customized Silverstripe w/ Ecommerce
Sam Oltz
Spearia, Inc. -
Re: Better US Localization

4 November 2008 at 6:06pm
If you want this to be included / debated for the core. Which I seem as quite reasonable you might like to post a patch to open.silverstripe.com
-
Re: Better US Localization

5 November 2008 at 3:57am
Better support for the M/D/Y format would be great, too. So many of my clients are confused by the CalendarDateField when they're entering data. "What on earth is month 19?!"
And of course, with manual entry, you end up getting a lot of December 31, 1969's
-
Re: Better US Localization

7 November 2008 at 7:59am
I'm based in NYC and have needed US date formats for my customers. It's not comprehensive, but for adjusting the CMS I've used the following successfully:
/jsparty/calendar/calendar-setup.js
Change line 5 in initialise()
ifFormat : "%m/%d/%Y", // the date formatChange line 32 in setToToday()
this.value = ( date.getMonth() + 1 ) + '/' + date.getDate() + '/' + date.getYear();/sapphire/forms/DateField.php
Change line 18 in setValue()
$this->value = preg_replace('/^([\d]{2,4})-([\d]{1,2})-([\d]{1,2})/','\\2/\\3/\\1', $val);Change line 29 in dataValue()
return "$parts[3]-$parts[1]-$parts[2]";It would be nice to see the d/m/y (m/d/y) type code moved to the _config.php file so it could be easily updated. Has anyone done that successfully?
Hope that helps someone!
-John
-
Re: Better US Localization

7 November 2008 at 8:05am
Perfect!Thank you. Yes, I agree. This should be a no-brainer.
| 1985 Views | ||
|
Page:
1
|
Go to Top |



