• Resolved caprella

    (@caprella)


    Hi there. I’ve installed Loco Translate plugin and made some translations only for Password fields for verifying if it works correct. It doesn’t work. Here what I have after debugging.

    Constructor of UR_Form_Field_User_Pass provides correct translations, so I guess files with translations are accessible and included:

    $this->id = 'user_registration_user_pass';
    $this->form_id = 1;
    $this->registered_fields_config = array(
        'label' => __( 'Password ', 'user-registration' ),  /* HERE I HAVE TRANSLATED LABEL */
        'icon'  => 'ur-icon ur-icon-password',
    );
    
    $this->field_defaults = array(
        'default_label' => __( 'User Password', 'user-registration' ),    /* TRANSLATED LABEL AS WELL */
    );

    From here all data is already not translated and I don’t see any further call of localization function __():

    class UR_Frontend {
        ...
        public function user_registration_frontend_form( $field_object, $form_id ) {
    
            $class_name = ur_load_form_field_class( $field_object->field_key );
    
            if ( class_exists( $class_name ) ) {
    	    $instance  = $class_name::get_instance();  /* TRANSLATED DATA AS ABOVE */
    	    $setting['general_setting'] = $field_object->general_setting;  /* NOT TRANSLATED */
            }
        }
        ...
    }

    So actually I don’t see, how translation can be working. Before debugging I’ve tried switching between languages, putting translation files to UR folder and back to Loco one, etc. But nothing helped, my frontend pages are still only in English.

    Maybe I’m doing something wrong. Appreciate your helping. Thanks a lot

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translation (Loco Translate) not working’ is closed to new replies.