• Hi,
    i want to use last_post_redirect_load_plugin_textdomain on a plugin
    but when i use code

    $plugin_wp_content_plugin_dir = dirname(plugin_basename( __FILE__ ));
    
    function last_post_redirect_load_plugin_textdomain() {
    	global $plugin_wp_content_plugin_dir;
    	load_plugin_textdomain('last-post-redirect', false, $plugin_wp_content_plugin_dir.'/lang/');
    }
    add_action('plugins_loaded', 'last_post_redirect_load_plugin_textdomain');

    It didn’t work.(echo __("111", 'last-post-redirect'); it should be 222)
    My WordPress is zh_TW and the file in lang/ is last-post-redirect-zh_TW.mo and last-post-redirect-zh_TW.po
    HELP!

Viewing 4 replies - 1 through 4 (of 4 total)
  • $plugin_wp_content_plugin_dir 是什么?
    PS。你是中国人吗

    试试:

    $plugin_wp_content_plugin_dir = dirname(plugin_basename( __FILE__ ));
    
    function last_post_redirect_load_plugin_textdomain() {
    	global $plugin_wp_content_plugin_dir;
    	load_plugin_textdomain('last-post-redirect', false, dirname(plugin_basename(__FILE__)));
    }
    add_action('plugins_loaded', 'last_post_redirect_load_plugin_textdomain');

    把语言文件和插件放在同一个文件夹

    I’m sorry but these are English language forums, so please use English or provide an English translation. Alternatively, use a WP support forum in your language.

    Thread Starter Arefly

    (@eflyjason)

    esmi, sorry i’ve use English but just 快乐家园 didn’t use
    快乐家园, i’ve try this but i cannot. (Plz listen to esmi and use Engilsh )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with last_post_redirect_load_plugin_textdomain!’ is closed to new replies.