Support

Account

Home Forums Front-end Issues Changing text of an error message or translation?

Helping

Changing text of an error message or translation?

  • Hi Guys Im trying to translate a specific errormessage, I have now tried with another plugin named loco, but theres no option to translate an error message im getting on an email field.

    The email field looks like this:

    <div class=”acf-input-wrap”><input id=”acf-field_5b0137ee39f62″ class=”error” name=”acf[field_5b0137ee39f62]” value=”” placeholder=”” aria-invalid=”true” type=”email”><label id=”acf-field_5b0137ee39f62-error” class=”error” for=”acf-field_5b0137ee39f62″>Please enter a valid email address.</label></div>

    This is what is generated by your plugin, i tried to change the error message using Jquery with no luck, is there any way you can help me :)?

    “tried”:

    jQuery(“#acf-field_5b0137ee39f62-error”).html(“Email ikke indtastet korrekt”);

    .html .text // nothing works

    even selecting the .error class doesnt work.

  • For example in your jquery-js with:

    $(document).ajaxComplete(function() {
        $('.acf-notice p').each(function() {
            var text = $(this).text();
            $(this).text(text.replace('Wert ist erforderlich = OLD MESSAGE', 'Bitte ausf├╝llen = NEW MESSAGE')); 
        });
    });
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.