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';
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.