Description
Allows you to filter the file that is loaded for translation.
If the translate.wordpress.org language pack is available, it will be /wp-content/languages/plugins/wp-members-{locale}.mo by default. You can filter this if you want to load a language pack from a different location (or different file name).
Parameters
$file
(string) (required) The path to the language file to load.
$locale
(string) (optional) The current language locale.
Usage
add_filter( 'wpmem_localization_file', 'load_my_wp_members_localization_file', 10, 2 ); function load_my_wp_members_localization_file( $file, $locale ) { $file = '/path/to/file/wp-members-' . $locale . '.mo'; return $file; }
Changelog
Added in version 3.0.0
3.2.0 Added $locale as a parameter.
Source
wpmem_localization_file is located in inc/class-wp-members.php