[wp-hackers] Localizing plugins

Jamie Talbot wphackers at jamietalbot.com
Thu Jan 26 01:22:25 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ryan Duff wrote:
> Jamie Talbot wrote:
> 
>> define ("IM_DIR", "wp-content/plugins/ImageManager/");
>> define ("IM_DOMAIN", "ImageManager");
>> load_plugin_textdomain(IM_DOMAIN, IM_DIR);
>>
> Alternatively, I think you can use...
> 
> load_plugin_textdomain('ImageManager',$path =
> 'wp-content/plugins/ImageManager');
> 
> 

Well, of course.

The definitions were edited out of a plugin where I require the information in other places in the
code as well.  Plus, if you wanted to change the plugin domain because there was a clash (unlikely)
or if you changed the plugin name, you'd only need to update it in one place.  And having some kind
of definition for the plugin path is useful anyway (as discussed in another topic).

- --
http://jamietalbot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD2CRRrovxfShShFARAsEkAJ9OnAU4Zqcxv3swmV9akUOkuO7V6wCfZ0hf
+5MvAJblboVU+0TxrrHGofM=
=XzQn
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list