Forum .LRN Q&A: Re: How to internationalize dates?

Posted by Lars Pind on
I haven't touched ad_dateentrywidget, so I don't know what's involved.

I have fixed the form builder's date widget, though. See packages/calendar/www/cal-item-edit.tcl for an example of how that works.

As far as getting a list of month names goes, you can use the procedure "lc_get" to dig directly into the data in acs-lang/tcl/localization-data-init.tcl.

For example, to a list of the localized full month names, say "lc_get mon". Abbreviated month names are "lc_get admon". See localization-data-init for what values are available.

For example of code that's using this heavily, see packages/acs-datetime/tcl/*.tcl.

I doubt that it would be very hard to fix ad_dateentrywidget to become internationalized, but I think the form builder is recommended practice nowadays.