• Resolved machinette

    (@machinette)


    Hi,

    Seems like I’m unable to fix the translation of the empty field validation message on the registration form. To replicate just submit and empty form.

    The validation alert should say Nombre de usuario es obligatorio but instead is saying Username es obligatorio, been searching and the string is %s is required => es obligatorio, samething is happening with the password field which says Password es obligatorio instead of Contrase?a es obligatoria.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • @machinette

    This is the coding used by UM and the %s is being replaced either by your field Label or Title from the UM Forms Builder.

    You can change the field Titles or Label to get your desired translations.

    ../plugins/ultimate-member/includes/core/um-actions-form.php Total of 943 lines.
    
    Found the search string: "%s is required" 4 time(s)"
    
    537 UM()->form()->add_error( $key, sprintf( __( '%s is required.', 'ultimate-member' ), $array['title'] ) );
    541 UM()->form()->add_error( $key, sprintf( __( '%s is required.', 'ultimate-member'), $array['title'] ) );
    545 UM()->form()->add_error( $key, sprintf( __( '%s is required.', 'ultimate-member' ), $array['title'] ) );
    582 UM()->form()->add_error( $key, sprintf( __( '%s is required', 'ultimate-member' ), $array['label'] ) );
    • This reply was modified 1 year, 9 months ago by missveronica.
    Thread Starter machinette

    (@machinette)

    Had to change it in both labels: Name and label, thanks but with this site the solution is accepted because it isn’t multilanguage but what will happen on a multilanguage site?

    What’s the best practice when creating a form with this plugin? Use the site’s main languge for fields label and names nad whish that the translation will work with the secondary languages? Is this why this happened? site language is Spanish but the field names are in English…

    I’m not the original developer of the site and never used UM

    Thanks a lot

    @machinette

    UM Version 3.0 will have better integration with multilingual Plugins.

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hi @machinette

    You have to edit texts “%s is required” and “%s is required.” to translate the empty field validation message. You should use a special program or plugin to edit language files.

    The first part of the message “%s” is replaced with the field’s Label. You can edit fields and their labels in the Form Builder on wp-admin > Ultimate Member > Forms > Edit Form.

    You should install a special multilingual plugin to make your site multilingual. This plugin duplicates pages and creates Login, Register, User pages for each language. I recommend you to duplicate and translate Ultimate Member forms for each language and put a proper form shortcode into each translated page. There are instructions for this in the documentation: https://docs.ultimatemember.com/article/1449-how-to-translate-plugin#forms

    Regards

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hi machinette,

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Translation issue’ is closed to new replies.