I wrote plugin for wordpress. I maked po file and added load_plugin_textdomain('wp-hebdate') to code but the translation not loaded.
line to example: _e('Number','wp-hebdate')
I wrote plugin for wordpress. I maked po file and added load_plugin_textdomain('wp-hebdate') to code but the translation not loaded.
line to example: _e('Number','wp-hebdate')
check this page:
http://codex.wordpress.org/Function_Reference/load_plugin_textdomain
I read it of course.
I I wrote like in the codex but the translation not working.
<?php load_plugin_textdomain( 'my-plugin', false, dirname( plugin_basename( __FILE__ ) ) ); ?>
according to your first post you just used:
load_plugin_textdomain('wp-hebdate')
thanks, I checked it and it not working.
I added load_plugin_textdomain('wp-hebdate', false, dirname( plugin_basename( __FILE__ ) ) ); but the srings still in English.
have you uploaded the mo file as well as the po file?
Yes, of course.
What's your language file named? Translation files have a specific naming scheme, which differs for plugins and themes...
If for example you were loading the french translation for the above text domain the name is expected be.. wp-hebdate-fr_FR.mo ...
Still problems, try the demo plugin i posted on my blog, and see if that helps clear up your understanding.
http://t31os.wordpress.com/2010/06/09/wordpress-plugin-translation/
NOTE: Download link is in the third paragraph down, and it's a very basic and bare bones example simply to show how to do simple translation.
The file called simply he_IL.mo
I changed file name to wp-hebdate-he_IL.mo and the tranlation loaded.
thanks
Happy to help.. :)
This topic has been closed to new replies.