CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

date format in developer ui

1/23/2010 3:48:16 AMAvatarTrent BielejeskiLocation: MN 56514 USposts: 4Karma: 22

Is there a way to change the date formats on the properties page?

 

Like

Created
30/04/2009 22:21:44  to  04/30/2009 22:21:44
In the US the date format is mm/dd/ccyy
Trent
1/23/2010 9:41:14 AMAvatarThomas HöhlerLocation: Bad Homburg, Germanyposts: 1086Karma: 1279
Comment with ID: 24115

try adding the culture en-US into the web.config:

<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="en-US" />

hth

1/23/2010 1:43:21 PMAvatarImmo WacheLocation: Berlin, 13158, Germanyposts: 65Karma: 142
Comment with ID: 24120

Hi Trent,

go to /umbraco/config/lang and copy en.xml to us.xml. Open us.xml with an editor of your trust and change:

<language alias="en" intName="English (uk)" localName="English" lcid="" culture="en-GB">

into

<language alias="us" intName="English (us)" localName="English" lcid="" culture="en-US">

and save. Now you can go to User section open your user and select Language English (us). You will get US date format in Umbraco back office.

HTH

2/9/2010 3:56:48 AMAvatarTrent BielejeskiLocation: MN 56514 USposts: 4Karma: 22
Comment with ID: 25734

that did work. Thank you.

But it did kinda break the tinymce editor

 

TinyMCE: Error loading language 'us'. Please download language pack from tinymce.moxiecode.com

 

any ideas

Trent

 

2/9/2010 2:28:42 PMAvatarSean MooneyLocation: Akron, ohposts: 19Karma: 28
Comment with ID: 25798

@Trent, I followed Immo's instructions but instead of creating a new file I just changed the existing (en.xml) one from

<language alias="en" intName="English (uk)" localName="English" lcid="" culture="en-GB">

to

<language alias="en" intName="English (us)" localName="English" lcid="" culture="en-US">

It fixed the date issue, and haven't noticed any problems.

-Sean

2/9/2010 4:42:12 PMAvatarImmo WacheLocation: Berlin, 13158, Germanyposts: 65Karma: 142
Comment with ID: 25815

Hi Trent,

I think the way from Sean is much better and avoid the problems with TinyMCE3.

For the case you need both en-US and en-GB languages you need to extend TinyMCE3 with the "us" Language. For this you need to copy and modify from en*.js to us*.js:

/umbraco_client/tinymce3/langs/us.js
/umbraco_client/tinymce3/themes/umbraco/langs/us.js
/umbraco_client/tinymce3/themes/umbraco/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/table/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/paste/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/media/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/advhr/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/advimage/langs/us_dlg.js
/umbraco_client/tinymce3/plugins/advlink/langs/us_dlg.js

In each file you have to update language reference at the begin from en to us e.g. in tinymce3/langs/us.js.
from:


tinyMCE.addI18n({en:{

to:


tinyMCE.addI18n({us:{

This is also the case for extending of Umbraco back office UI for an additional language.

HTH, Immo

Please login or Sign up To post replies