[wp-hackers] Localizing plugins
wphackers at jamietalbot.com
Thu Jan 26 01:22:25 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
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 =
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).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the wp-hackers