WPML

문제 개요

Ninja Forms와 해당 Repeatable Fields (새 탭에서 열림) 기능을 사용할 때 번역에 문제가 발생할 수 있습니다. WPML 문자열 번역을 사용하여 필드를 번역할 수 있지만, 상위 리피터 필드 레이블을 번역할 때 하위 필드의 번역이 덮어쓰입니다.

임시 해결 방법

이 문제는 Ninja Forms Multilingual 0.3.1에서 해결되었습니다. 업데이트하면 사이트에서 문제가 해결되므로, 아직 업데이트할 수 없는 경우에만 이 임시 해결 방법이 필요합니다.

진행하기 전에 사이트의 전체 백업을 반드시 수행하세요.

  1. …/wp-content/plugins/wpml-ninja-forms/classes/Hooks/NinjaForms/Strings.php 파일을 여세요.
  2. 62번째 줄을 찾으세요.
  3. 다음 코드를:
    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 ) );
    }
    다음으로 교체하세요:
    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 ) );
    	}
    }

모든 알려진 문제

여전히 이 문제가 발생합니까?

업데이트해도 문제가 해결되지 않으면 지원 문의를 하세요. 함께 살펴보겠습니다.