[wp-trac] Re: [WordPress Trac] #9396: Month name declension
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 3 12:44:47 GMT 2009
#9396: Month name declension
-------------------------------+--------------------------------------------
Reporter: waclawjacek | Owner: nbachiyski
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: i18n | Version: 2.7.1
Severity: minor | Resolution:
Keywords: reporter-feedback |
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
Ah... What a wonderfully complicated grammar. :-D
There is functionality in gettext to use one of two strings based whether
it's a plural or singular, but I'm pretty certain that gettext won't
manage that use-case correctly.
It's due to the fact that the strings are translated out of context and
tossed "as is" into the result returned by php's date() function.
What *is* possible, however, is to programaticaly extract the context
based on the original requested date format. The patch I'll upload in a
sec will let you do just that.
You'd then need to write a plugin that catches whether a day is present in
the requested format (see http://fr.php.net/manual/en/function.date.php),
and that translates the resulting string as it should be.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9396#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list