I’m unable to load the plugin’s locale file (.mo). I did all the procedues described in the http://codex.wordpress.org/Writing_a_Plugin but its not working. If I the lang string to the wordpress default wp-content/language/de_De.mo
file then its show the correct translated string. but not loading the data from my plugin folder 🙁
EDIT:
$plugin_dir = basename(dirname(__FILE__)) ."/lang/";
load_plugin_textdomain( 'tboy_displayTimeZone', null, $plugin_dir );
“All procedures” is not very descriptive. 🙂
Are you calling
load_plugin_textdomain()
function? Had you set domain in your plugin’s strings?There is also relevant section here: I18n for theme and plugin developers
You have to check if the plugin’s unique name is described in the translation keywords terms.
For example in this code:
The unique name is “your-plugin-unique-name”. You should add this on load function:
And also has it in your .MO file’s name: ‘your-plugin-unique-name-de_DE.mo’
It will work.