[wp-trac] Re: [WordPress Trac] #9396: Month name declension

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 3 19:53:35 GMT 2009


#9396: Month name declension
-----------------------------------+----------------------------------------
 Reporter:  waclawjacek            |        Owner:  nbachiyski
     Type:  enhancement            |       Status:  reopened  
 Priority:  normal                 |    Milestone:  2.8       
Component:  i18n                   |      Version:  2.7.1     
 Severity:  minor                  |   Resolution:            
 Keywords:  has-patch 2nd-opinion  |  
-----------------------------------+----------------------------------------

Comment(by Denis-de-Bernardy):

 >  * '''Separate strings for everything''' - allow the translators to
 translate month names wherever they appear (separate string for every
 month in every spot).

 No no, I think you're not understanding. The underlying technology is GNU
 gettext. So WP is limited to that, and that only. Underneath, the January
 string used to localize the results of date() is a January string -- taken
 completely out of context.

 >  * '''Add an argument optionally passed to date_i18n() occurrences''' -
 every time a month name should be inflected - pass an argument telling the
 function which variant of a month name it should return

 That's pretty much what my plugin does. You scan for, say, d in the
 string, and if present you deduce it's something like 1st of January, and
 you override the thing accordingly using a plugin.

 Adding an option to date_i18n probably isn't an option. Polish needs
 month, maybe another language needs the weekday, and maybe some other
 needs whatnot. With the filter I added, you can manage specifics for this
 or that language through the use of language-specific plugins, without
 cluttering the WP code base.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9396#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list