If you've come this far, you should be ready for a victory lap: you've done a lot of work to internationalize and localize your plugin. The final thing you need to do is to tell WordPress to actually load up your localized translations. The format of the function is as follows:
load_plugin_textdomain('your-unique-name','/path/to/your/plugin-name/location-of-language-files/');
Again, for consistency we recommend using the same name for your plugin's folder as for your textdomain. We've seen some inconsistent behavior in different plugins and applications that seem to expect this naming convention, so it's best to follow it. To load the language files, all you need to do is to tie into a WordPress action and reference the load_plugin_textdomain()
function.
Chances are that you've already hooked into WordPress' init
action somewhere in your plugin, so you can just add the load_plugin_textdomain()
function to the callback function that you have already defined. If your plugin...