[wp-hackers] i18n of plugin description

Jacob Santos wordpress at santosj.name
Thu Jan 24 13:07:17 GMT 2008


Stefano Aglietti wrote:
> On Thu, 24 Jan 2008 11:20:36 +0100, Lutz Schröer <latz at elektroelch.de>
> wrote:
>
>   
>> While doing the i18n of my plugin I realized that I can translate 
>> everything EXCEPT the description of my plugin which appears on the 
>> admin plugin page.
>>
>> Am I missing something or is there a gap in the i18n support of WordPress?
>>     
>
> The commented text used for meta info about plugin came before the
> loading of textdomain... few months ago we talked about a way to have
> various lines of comments for various languages. so translators should
> add new commnent line specifically targetted to a specific locale.. I
> cant' find it now.. but if you serach here on on polyglots mailing
> list you should find that discussion.
>
> If I remeber correctly after the discussion didn't follow any real
> implementation of this method...
>
>   
This problem has interested me and I do think that if you send me the 
solution in that post, I might be able to create a patch.

1. From what I can think of, the solution might seem to be, either 
choosing the plugin file name by locale, so for German, it would be 
"pluginfilename_DE.php", however, this method is pretty terrible.

2. The second method would be to either have separate files, but with a 
new locale comment description which describes the locale. This will 
allow only choosing to load the correct plugin file by locale instead.

3. The third method extends the second and allows for placing all of the 
locale in the same file. So it extends upon the previous patch, where 
brackets are used, except that the parsing would be a little bit more 
slower and the locale would absolutely have to be before the description 
text.

/*
locale: en_US
plugin name:
version:

locale: de_??
plugin_name:
version
*/

That is all I can think of. Each one has its disadvantages. I think it 
would be neat to have an implementation for this problem. I'm willing to 
implement a solution, depending on the complexity.

-- 

Jacob Santos

http://www.santosj.name - blog
http://funcdoc.wordpress.com - WordPress Documentation Blog/Guide Licensed under GPLv2

Also known as darkdragon and santosj on WP trac.



More information about the wp-hackers mailing list