[wp-polyglots] Trying to translate a plugin

Pandem pandemtandem at gmail.com
Tue Feb 28 08:43:32 GMT 2006


Karl Wångstedt escribió:
>
> The problem arises when I want to add the .mo to the plugin. I can't 
> get it to work.
>
> The plugin I'm translating is WP-contacform 
> [http://ryanduff.net/projects/wp-contactform/]
> It uses the textdomain-function in the top, and it looks like this:
> load_plugin_textdomain('wpcf');
>
> From what I read in the codex the syntax should be:
> load_plugin_textdomain('myplugin','wp-content/plugins/myplugin');

You must use the function load_plugin_textdomain('wpcf') and add this 
textdomain to your tags like this: __('[some text string]', 'wpcf'), I 
think the second argument for load_plugin_textdomain() is not needed if 
you place the mo file in the same directory as the plugin file.

Hope this helps.
Maira


More information about the wp-polyglots mailing list