Support

Account

Home Forums Backend Issues (wp-admin) How to translate field labels without WPML Reply To: How to translate field labels without WPML

  • The problem continues for me as well. I have added those filters mentioned by briandoh, and I have tried different priorities and replacing esc_html__() with __(), but nothing is being translated. Could the reason be, that I’m trying to do this within a plugin?

    This is my code for loading the translation:

    /**
     * Load translations
     */ 
    add_action('plugins_loaded', 'sg_slide_in_load_plugin_textdomain'); 
    function sg_slide_in_load_plugin_textdomain() {
        load_plugin_textdomain('sg-slide-ins', FALSE, basename(dirname( __FILE__ )) . '/languages/');
    }
    
    add_filter('acf/settings/l10n', 'sg_slide_in_acf_settings_localization');
    function sg_slide_in_acf_settings_localization($localization){
    	return true;
    }
    
    add_filter('acf/settings/l10n_textdomain', 'sg_slide_in_acf_settings_textdomain');
    function sg_slide_in_acf_settings_textdomain($domain){
    	return 'sg-slide-ins';
    }