[wp-hackers] Localizing plugins

Ryan Duff ryan at ryanduff.net
Thu Jan 26 01:13:25 GMT 2006


Jamie Talbot wrote:
> Hi,
> 
> It's already implemented!  You can set the directory yourself:
> 
> define ("IM_DIR", "wp-content/plugins/ImageManager/");
> define ("IM_DOMAIN", "ImageManager");
> 
> load_plugin_textdomain(IM_DOMAIN, IM_DIR);
> 
> Then:
> 
> __('A returned string', IM_DOMAIN);
> _e('An echoed string', IM_DOMAIN);
> 
> Hope this helps,
> 
> Jamie.

Alternatively, I think you can use...

load_plugin_textdomain('ImageManager',$path = 
'wp-content/plugins/ImageManager');


-- 
Ryan Duff
http://ryanduff.net
AIM: ryancduff
irc.freenode.net #wordpress


More information about the wp-hackers mailing list