Skip to content

localize dates according to document lang in NL, DE and EN (default)#150

Open
gronke wants to merge 5 commits intoradicallyopensecurity:mainfrom
gronke:feat/localized-dates
Open

localize dates according to document lang in NL, DE and EN (default)#150
gronke wants to merge 5 commits intoradicallyopensecurity:mainfrom
gronke:feat/localized-dates

Conversation

@gronke
Copy link
Copy Markdown
Contributor

@gronke gronke commented Jun 3, 2025

Localizes dates in Dutch, German and English (default) with custom functions.

Hardcoding the month names helps to avoid fiddling with Saxon and Java.

@gronke gronke requested a review from PeterMosmans June 3, 2025 19:24
Copy link
Copy Markdown
Contributor

@syrosh syrosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think it's fine to go ahead with hard coded values. Maybe adding the Java way if we need to support more localization.

Copy link
Copy Markdown
Contributor

@PeterMosmans PeterMosmans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, as it stands, this errors out if there's no date (yet) set:

Error at char 36 in xsl:value-of/@select on line 321 column 106 of meta.xslt:
  XPST0008  Variable date has not been declared (or its declaration is not in scope)

I'm thinking of whether we can support a default (?) language as fallback, in order to ensure backwards compatibility?

gronke and others added 5 commits March 20, 2026 13:22
Use @Date attribute instead of undeclared $date variable in version
history, and use the -tbd variant to handle missing dates gracefully.
Default lang parameter to 'en' when xml:lang is not set.
@gronke gronke force-pushed the feat/localized-dates branch from d0b6d9d to 683be03 Compare March 20, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants