Translation of <date><today /></date>

29 views
Skip to first unread message

jsebastie...@gmail.com

unread,
Aug 25, 2020, 2:50:56 PM8/25/20
to PreTeXt support
I wanted to add the tags <date><today /></date> to my frontpage to know which version is live. The date does not get translated to french. 

Is that an easy fix?  I can't find any place in fr-FR.xsl where months/day are mentionned, so I figure it must be done outside of this.

Rob Beezer

unread,
Aug 25, 2020, 3:55:47 PM8/25/20
to pretext...@googlegroups.com
Right. The values are coming from

http://exslt.org/date/

and it appears to me that there is no option for different languages, and that
values are in English.

We have two options for an @format option:

'month-day-year' and 'yyyy/mm/dd'

As a stopgap, you can try the all-number version (which I would do today with a
dash, not slash).

But certainly we could put month names in the localization files in the various
languages (and not day names?).

And we could institute different formats for dates:

17 February 2020

Bonus: make the default format vary with the language.

If you were willing to provide French names (plus) and help design and test, it
would not be too big a job to write the code.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/8494852c-d752-4842-b456-070687cf8bbdn%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/8494852c-d752-4842-b456-070687cf8bbdn%40googlegroups.com?utm_medium=email&utm_source=footer>.

jsebastie...@gmail.com

unread,
Aug 25, 2020, 4:08:13 PM8/25/20
to PreTeXt support
A quick look at http://exslt.org/date/index.html under other element shows <date:date-format name = qname calendar = "gregorian" | qname-but-not-ncname lang = language first-day-of-week = "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | string />

Do we/can we use something like this?

I'm willing to help, but I'll need to be told were to look and what to change. Can test no problem

Rob Beezer

unread,
Aug 25, 2020, 5:23:01 PM8/25/20
to pretext...@googlegroups.com
Good catch. That is an "extension element", which is a construction I don't
think we have ever used, rather than an "extension function" which is used
routinely.

I tried to give it a go (I think I used it correctly) but it provoked errors.
Which may not be a surpise since

http://exslt.org/date/elements/date-format/index.html

says

> There are currently no XSLT processors that we know of that support date:date-format natively.
>
> There are currently no third-party implementations of date:date-format.

I'll give some thought to how to implement this, I'll just need your help with
translations and formats.

Rob


On 8/25/20 1:08 PM, jsebastie...@gmail.com wrote:
> A quick look at http://exslt.org/date/index.html under other element shows
> <date:date-format name = qname calendar = "gregorian" | qname-but-not-ncname
> *lang = language * first-day-of-week = "sunday" | "monday" | "tuesday" |
> https://groups.google.com/d/msgid/pretext-support/82f64e20-b31b-4ad6-86cb-c7f08abda8a1n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/82f64e20-b31b-4ad6-86cb-c7f08abda8a1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jean-Sébastien Turcotte

unread,
Aug 25, 2020, 5:24:17 PM8/25/20
to pretext...@googlegroups.com
Ping me when ready! 

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-support/jrHGTBBkPlw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/8ece8fc1-9b40-dae0-3e88-c97bdf245a40%40ups.edu.

jsebastie...@gmail.com

unread,
Feb 23, 2021, 10:14:56 AM2/23/21
to PreTeXt support
Our conversation about fr-CA had me thinking about this date issue. Where you able to make any progress? Can I help in any way?
Reply all
Reply to author
Forward
0 new messages