[wp-trac] Re: [WordPress Trac] #7753: Use of localized calendar
system and translating digits in entire WordPress
WordPress Trac
wp-trac at lists.automattic.com
Tue May 5 14:22:15 GMT 2009
#7753: Use of localized calendar system and translating digits in entire WordPress
------------------------------------+---------------------------------------
Reporter: kambiz.k | Owner: anonymous
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.8
Component: i18n | Version: 2.6.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+---------------------------------------
Changes (by Denis-de-Bernardy):
* keywords: has-patch reporter-feedback => has-patch dev-feedback
Comment:
Ya, I think I'm understanding what you're meaning. Took me a good hour of
playing around to make sense of it, too.
My understanding of the code in that area and of your suggested change to
the mysql2date call in touch_time() is that, it may prevent other locale
(that use the standard calendar) from working properly. Trying to rephrase
what you're suggesting:
- You'd like to be able to output numbers in a non-latin format -- patch
7753.2.diff lets you do just that, but I'll open a separate ticket else
it'll get lost in this one.
- You'd like the WP front end, and the back-end, to display dates in your
localized calendar.
By the latter point, you're not merely meaning changing the number format.
You're also meaning that it should be able work with other calendars such
as jalali, jewish, maya, julian, french revolutionary, and so on... These
calendars don't all 7 days a week, or 365 days per year (some are lunar
based).
Making that happen would involve huge workflow changes in the WP code
base: your suggested change to touch_time() would also be relevant to
scores of other template tags, and the number_i18n filter is missing on
the likes of pagination template tags. And I dare not even imagine how
this translates into DB queries. How does one group posts by month in a
non-gregorian calendar? :D
The get_calendar() function outputs a Gregorian calendar in that format.
It lets one change the start date, and that's about it... To make the
existing code work with a non-gregorian calendar, we'd want to look into:
- the number of days per week which isn't always 7 (assuming there is any
kind of week concept to start with)
- something to make special days work (in some calendars, some days don't
belong in any month)
- lunar months, and scores of other oddities, rather than gregorian
months
- non-decimal number support (some cultures count in base-5 and base-20)
Personally, I'd advise to write a plugin...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7753#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list