WPML

Overview of the Issue

When using Ninja Forms and its Repeatable Fields (opens in a new tab) feature, you may encounter an issue with translations. Although the fields can be translated using WPML String Translation, the translations of the subfields get overwritten when translating the parent repeater field label.

Workaround

This issue is fixed in Ninja Forms Multilingual 0.3.1. Updating solves it on your site, so you only need this workaround if you can’t update yet.

Please, be sure to make a full backup of your site before proceeding.

  1. Open …/wp-content/plugins/wpml-ninja-forms/classes/Hooks/NinjaForms/Strings.php file.
  2. Look for line 62.
  3. Replace this code:
    PHP
    if (
    	$this->getFormId() && $this->notEmpty( 'settings', $field )
    	&& $this->notEmpty( 'type', $field['settings'] )
    	&& $this->isTranslatableFieldType( $field['settings']['type'] )
    ) {
    	$field['settings'] = $this->getPackage()->translateField( $field['settings'], $this->getId( $field ) );
    }
    With:
    PHP
    if (
    	$this->getFormId() && $this->notEmpty( 'settings', $field )
    	&& $this->notEmpty( 'type', $field['settings'] )
    	&& $this->isTranslatableFieldType( $field['settings']['type'] )
    ) {
    	if (! array_key_exists('repeaterField', $field['settings'] ) && $field['settings']['repeaterField'] != true ) {
    		$field['settings'] = $this->getPackage()->translateField( $field['settings'], $this->getId( $field ) );
    	}
    }

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.