[MAGNOLIA-2012] out tag: property dateLanguage has no effect with custom formats Created: 21/Jan/08  Updated: 23/Jan/13  Resolved: 08/Jul/08

Status: Closed
Project: Magnolia
Component/s: taglibs
Affects Version/s: 3.5.3
Fix Version/s: 3.6, 3.5.9

Type: Bug Priority: Minor
Reporter: Tom Wespi Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-2227 DateUtil ignores locale for custom da... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Comments   
Comment by Jeff Snider [ 21/Feb/08 ]

This does appear to work. I put this in a paragraph jsp:

<cms:out nodeDataName="MetaData/mgnl:lastmodified" />

which resulted in this in the output (At least for me, my default locale is en):

Feb 20, 2008

When I replaced the above tag with:

<cms:out nodeDataName="MetaData/mgnl:lastmodified" dateLanguage="fr" />

The output changed to:

20 févr. 2008

Keep in mind that the dateLanguage and datePattern attributes on the out tag only take affect when the referenced nodeData is of type "Date." Another possible explanation is that if the language you are selecting doesn't exist in /server/i18n/system/languages/ (I think. Please comment if I have that wrong.) then it will silently use the default.

Could you add some example code here as well as an export of the page or contentNode where this isn't working for you?

Comment by Will Scheidegger [ 18/Apr/08 ]

Strange enough dateLanguage will get ignored depending on what kind of datePattern you have

<cms:out nodeDataName="MetaData/mgnl:lastmodified" dateLanguage="fr" />

actually seems to work (I got "8 avr. 2008" on Mag 3.5.4), but

<cms:out nodeDataName="MetaData/mgnl:lastmodified" datePattern="EEEE, d. MMMM yyyy" dateLanguage="fr" />

does not (I get "Tuesday, 8. April 2008")

Comment by Magnolia International [ 08/Jul/08 ]

fixed by MAGNOLIA-2227. Patch applied on 3.5 branch and trunk (3.6)
Added testcases.

Generated at Mon Feb 12 03:32:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.