Home › Forums › Backend Issues (wp-admin) › ACF Javascript API – Dynamically Update select2 Field Options › Reply To: ACF Javascript API – Dynamically Update select2 Field Options
I forgot that you have to define the associated translations via normal PHP with:
acf_localize_text(array(
'the results could not be loaded.' => _x( 'The results could not be loaded.', 'Select2', 'picture-frame' ),
'please delete' => _x( 'Please delete', 'Select2', 'picture-frame' ),
'character' => _x( 'character', 'Select2', 'picture-frame' ),
'please enter' => _x( 'Please enter', 'Select2', 'picture-frame' ),
'or more characters' => _x( 'or more characters', 'Select2', 'picture-frame' ),
'loading more results…' => _x( 'Loading more results…', 'Select2', 'picture-frame' ),
'you can only select' => _x( 'You can only select', 'Select2', 'picture-frame' ),
'item' => _x( 'item', 'Select2', 'picture-frame' ),
'no results found' => _x( 'No results found', 'Select2', 'picture-frame' ),
'searching...' => _x( 'Searching...', 'Select2', 'picture-frame' ),
'remove all items' => _x( 'Remove all items', 'Select2', 'picture-frame' ),
'remove item' => _x( 'Remove item', 'Select2', 'picture-frame' ),
'search' => _x( 'Search', 'Select2', 'picture-frame' ),
));
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.