Can you please share the screenshot of the issue that would be great to understand and resolve one?
Same issue here, the PO language files are not loaded. I tried adding the function below to theme’s functions.php, because the plugin is not calling “load_plugin_textdomain” still not working:
function fitness_calculator_init() {
$plugin_rel_path = basename( dirname( __FILE__ ) ) . ‘/languages’; /* Relative to WP_PLUGIN_DIR */
load_plugin_textdomain( ‘fitness-calculators’, false, $plugin_rel_path );
}
add_action(‘plugins_loaded’, ‘fitness_calculator_init’);
Loading the plugin translations should not be done during plugins_loaded action since that is too early. Calling load_plugin_textdomain() should be delayed until init action:
add_action(‘init’, ‘fitness_calculators_init’);
-
This reply was modified 5 years, 2 months ago by
ryancole. Reason: resolved
-
This reply was modified 5 years, 2 months ago by
ryancole.
Fixed! here is the correct working code below, changed the path to be added to theme functions.php:
function fitness_calculators_init() {
$plugin_rel_path = ‘/fitness-calculators/languages’;
load_plugin_textdomain( ‘fitness-calculators’, false, $plugin_rel_path );
}
add_action(‘init’, ‘fitness_calculators_init’);
-
This reply was modified 5 years, 2 months ago by
ryancole. Reason: resolved
-
This reply was modified 5 years, 2 months ago by
ryancole.