Locale

Hello

The Archives are rendering the english name of an month. The Locale setting in Railo is set correctly to German (Switzerland ).

Any ideas?

Cheers

Martin

Can you clarify where you are seeing this? Is this in the sidebar output from the Archives widget?

What happens when you output this?

#dateformat(now(),“mmmm yyyy”)#

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad

Yes, it’s the sidebar output from the widget.

Outputing #dateformat(now(),“mmmm yyyy”)# gives me the english text for the month. Strange, this points out, that the locale of Railo is wrong, but it isn’t.

Interesting-- I’ll be honest I’ve changed time zones before, but never local. Unless others have some experience with that, you may need to ask over on the Railo list. I’m very interested in the answer.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I figured out, that this is a server-wide problem. I will hand over this problem to the Rail people. On the other hand, i can’t believe, that the locale setting does not work. The Railo people are living in the same region as I’m at home.

Oopsy, all wrong. Reading stuff has it’s benefits:

To display the local date format we need to use #lsdateformat(now(),“mmmm yyyy”)#. The same for timeformat()

ContentBox uses in it’s files dateformat(), e.g. in Archives.cfc.

Ah, yes, that’s right. For the time being, you can update that via the widget editor. 2.0 will have lots of localization fixes, so I think this would be a safe patch. I’ll put in a ticket for this, just so it doesn’t slip through the cracks.

Thanks!

It isn’t really important to me, but thanks anyway. I checked my code, i did use the lsdateformat() already. To achive my formattings, i will have my own Archive CFC anyway.

Cheers

so if you use LSDateformat(thisDate,"mmmm yyyy”)

Will that work? Is the fix just to update dateFormat to lsDateFormat()

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Non-US-people needs to use LSDateFormat and LSTimeFormat to render the local date and time format all the time.

#LSdateformat(entry.getPublishedDate(),“dddd.mm.yyyy”)#

I tested it in my entry.cfm having #LSdateformat(entry.getPublishedDate(),“dddd mmmm.yyyy”)#. which returned the day and month in my language.

Is it save to replace Dateformat with LSDateformat globally? I think yes. But I’m wondering, why this tag deserves existence anyway. Isn’t it logically, that an application returns date and time in the actual local format? And for a multinational application the format could by set by script, eg. this.locale = "de_CH";

Dateformat : U.S. date formats
LSDateFormat: Rest of the universe.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_l_28.html

Yea I think first hand we need to update all our date and time formats to ls in our move to i18n capabilities.

Other idea: A global setting in ContentBox, where the pattern for displaying date and time can be entered. LSDateFormat does not save us from dd.mm.yy or mm.dd.yy, which we need to specify in LSDateFormat. So why not set the pattern in ContentBox and whole universe can set their needed format easy.

Yep. We have a ticket for that

I think that’s a great idea-- we could have a drop down in the admin with a bunch of common formats and perhaps an “other” where they could specify a mask. Can you put in tickets for these ideas?

https://ortussolutions.atlassian.net/browse/CONTENTBOX

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Actually it would have been a better idea to look at using time offsets, so I could have a server in the USA but it displays in the offset that I choose. Say GMT +10 for example…

I did raise a ticket for this over a year ago.