[wp-hackers] Testing plugin translations

Ozh ozh at planetozh.com
Thu Oct 4 07:58:38 GMT 2007


>and in petition.php I've called
>
>load_plugin_textdomain("fcpetition", dirname(__FILE__));

load_plugin_textdomain() needs a path relative to WP's root.
>From the source:
$mofile = ABSPATH . "$path/$domain-$locale.mo";

so I think you need something like:
load_plugin_textdomain('fcpetition', 
'wp-content/plugins/'.plugin_basename(dirname(__FILE__)));


Ozh


More information about the wp-hackers mailing list