[wp-hackers] no-code-duplication i18n for WordPress

Sabin Iacob iacobs at m0n5t3r.info
Tue Mar 4 19:20:17 GMT 2008

Anirudh Sanjeev wrote:
> okay then how about this:
> A seperate description text file for each language, in a seperate directory,
> or along with the .po files. All it's gonna be is desc-fr.txt or
> desc-it.txtand wordpress can detect this along with the appropriate
> textdomain and
> install them. This way the issues with size and translation are solved.

the idea was to avoid creating several files (there was an older 
proposal to add a file called metadata.php which would contain, well, 
the metadata, so wordpress would not need to load the whole plugin for 
that); some people seem to have the strange habit of putting all their 
plugin data and the kitchen sink into one file (php, html, javascript, I 
have yet to see base64-encoded images, but I wouldn't be very surprised 
to see it one day).

I, for one, am for something like:

can has metadata.php?
        include metadata.php
        parse teh plugin teh old way

since a separate file would be overkill for small plugins

> Also the major problem with adding them in the PO file is that the
> localization file is loaded only when the plugin is activated or
> load_plugin_textdomain is called

that's why metadata.php is a better idea: it could also 
load_plugin_textdomain if needed ;o)

More information about the wp-hackers mailing list