Home › Forums › Backend Issues (wp-admin) › ACF and Polylang › Reply To: ACF and Polylang
I managed to perfectly translate the AFC fields just bij reading the documentation on string translation
https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
So no difficult integration between polylang and ACF.
I just added pll_register_string to my functions.php.
This adds the sting inside the function very nicely to the list of translatable words in the admin section of polylang to translate in all available languages.
Then just add the pll__ en pll_e function with the respective sting in the code where ever you need a translated string.
Works like a charm.
e.g.
functions.php
function polylang_translate()
{
pll_register_string('back', 'back','General');
}
add_action( 'init', 'polylang_translate' );
Translate the string ‘back’ in the backend of WP under the category General.
index.php
pll_e( 'back' );
For more info read the polylang doc.
happy translating
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.