Hi,
For some weeks I have been developing a plugin for my website, and as the website's content is in many different languages I thought I would do the same with the plugin. So, while I was developing I used the function __() to prepare it for the translation. This is an example of how I've been using it:
__("<em>some-text</em>","ohar-itzultzailea")
Once I have finished with the coding I have created the .po and .mo file using Poedit and in order to do a quick test I have translated that .mo file to en_US. The name of my two .mo files is ohar-itzultzailea-eu.mo and ohar-itzultzailea-en_US.mo . Both files are located in a folder called 'hizkuntzak', which is inside the main folder of the plugin.
In my plugin's main file I have added this function to load the appropiate .mo file.
function oi_itzulpenakKargatu()
{
load_plugin_textdomain( 'ohar-itzultzailea', false, dirname(plugin_basename( __FILE__ )).'/hizkuntzak/' );
}
add_action('init', 'oi_itzulpenakKargatu');
In order to test it I 've changed the WPLANG property in wp-config to make it load the translated file.
define('WPLANG', 'en_US');
However, when I test the plugin the translation is not loaded and I do not know why, I have been reading some tutorials on the Internet but no luck. According to what I found, I think the text the plugin shows is loaded directly from the code, and not from the .mo files, no matter what language. Any clue about what could be wrong?
Thank you very much for your help, :D
Manex