load_textdomain is triggered just before the .mo file is loaded for translation when the function load_textdomain() is called either directly or via load_plugin_textdomain() by a plugin or load_theme_textdomain() by a theme. These two functions, in turn are wrappers for load_textdomain().
<?php add_action( 'load_textdomain', 'function_name' ); ?>
where "function_name" is the name of the function to be called.
<?php /** * Example of load_textdomain usage * @param string $domain Unique domain for translation. * @param string $mofile Path to the .mo file. * @param array|string $args Optional args used in taxonomy registration. */ function log_mo_file_load($domain, $mofile){ echo 'loading file "' . $mofile . '" on domain "' . $domain . '"'; // or whatever else you'd like to do here. } add_action( 'load_textdomain', 'log_mo_file_load' ); ?>
The load_textdomain hook is found in wp-includes/l10n.php
within the load_textdomain() function.