Home Forums ACF PRO Translation of select2 Taxonomy Tags


Translation of select2 Taxonomy Tags

  • Hi everyone,
    is there a way to hook into the reload ajax on select2 pulldowns whre data is a custom taxonomy? I need to get the data before there are displayed, translate them with “jquery string replace” and then show them in the select2 pulldown field.

    $('select option').each(function(){
         var text = $(this).text()
         .replace('german', 'english');

    works well on all select2 pulldowns. But by opening the custom taxonomy pulldowns, the options were reloaded and displayed as original text (in this case german terms). How can I hook into the reload and translate the options text before they show up in the pulldown? Thanks for any suggestion!

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Translation of select2 Taxonomy Tags’ is closed to new replies.