Problem when translating a plugin
-
Hi guys.
I would like to translating a plugin in my language, but it has not any pot file. So I try to modify a simpler plugin to learn how to do so.
This is the plugin I use for my tries.
https://github.com/wpexplorer/ban-users-wordpress-plugin/blob/master/ban-users-wordpress.php
And the modification I have done are the following://Text Domain: ban-users Domain Path: /languages/
In function rc_admin_init(), I insert
load_plugin_textdomain('ban-users', false, basename( dirname( __FILE__ ) ) . '/languages' );
Then in the end I modify the print string in this:
return new WP_Error( 'rc_banned', '<strong>'.__('This account has been suspended.', 'ban-users').'</strong>' );
Then I made the .pot file manually(coping from other plugin) and generate the .po and .mo with poedit, but the whole process does not work. Can you tell me what I am missing?
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem when translating a plugin’ is closed to new replies.