[wp-trac] Re: [WordPress Trac] #3089: Localized values for plugin metadata

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 7 05:35:01 GMT 2007

#3089: Localized values for plugin metadata
 Reporter:  nbachiyski                  |        Owner:  ryan
     Type:  enhancement                 |       Status:  new 
 Priority:  normal                      |    Milestone:  2.2 
Component:  General                     |      Version:      
 Severity:  normal                      |   Resolution:      
 Keywords:  bg|commit bg|needs-testing  |  
Comment (by majelbstoat):

 All these plugins will have there own plugin localisation domain defined
 right?  So how about something like this:

 Plugin Name: Bender, bender, where are you?
 Plugin Name[bg_BG]: Бендър, бендър, къде си?
 Plugin Domain: testdomain

 $plugin_domain = 'testdomain'; // Or a constant, or however the plugin
 defines it.
 $plugin_meta[$plugin_domain][name] = __('Bender, bender, where are you?',
 $plugin_meta[$plugin_domain][uri] = __('http://bender.wow',

 Then in the parsing code, if 'Plugin Domain:' is found, try to load
 $plugin_meta[$parsed_domain] name and uri, or fallback to the defaults
 parsed from the comments.

 It does require a little bit of duplication on the plugin author's part,
 but it's backwards compatible and will still work if it's not supplied...
 And this way, the name and uri can just become part of the POT file...

 I'd argue that a Plugin Domain would be a useful thing for a plugin to
 define anyway,  something that uniquely references it... (or perhaps it
 could be autogenerated from a sanitised form of the plugin name?)

 I'm not too keen on the proposed method, because it doesn't scale too
 well, as well as all the points raised by SteveAgl.

 Thoughts on this?

Ticket URL: <http://trac.wordpress.org/ticket/3089#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list