WPML
상태
개발자 대기 중
관련 플러그인/테마
FacetWP
주제 태그
Compatibility

문제 개요

FacetWP 플러그인을 사용하는 경우, ACF로 생성되어 FacetWP 패싯에 사용되는 체크박스 필드의 레이블이 Elementor 숏코드를 사용하여 페이지에 삽입될 때 번역이 표시되지 않는 문제가 발생할 수 있습니다.

임시 해결 방법

진행하기 전에 사이트의 전체 백업을 완료했는지 확인하세요.


  • 테마의 functions.php 파일을 여세요.

  • 다음 코드를 추가하세요:
    Add the following code to the functions.php file
    // WPML Workaround for compsupp-6751
    function wpml_compsupp6751_translate_facet_display_value( $label, $args ) {
    	if ( class_exists('Sitepress') ) {
    		$wpml_default_lang = apply_filters('wpml_default_language', NULL );
    		$wpml_current_lang = apply_filters( 'wpml_current_language', NULL );
    
    		if ($wpml_default_lang == $wpml_current_lang ) {
    			do_action( 'wpml_register_single_string', 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10), $label );
    		}	
    		// Apply the translation to the string
    		$label = apply_filters('wpml_translate_single_string', $label , 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10) );
    	}
        return $label;
    }
    add_filter( 'facetwp_facet_display_value', 'wpml_compsupp6751_translate_facet_display_value', 10, 2 );
  • 프런트엔드에서 원본 언어 페이지를 방문하여 문자열을 등록하세요.
  • WPML > 문자열 번역으로 이동하여 문자열을 번역하세요(FacetWP 텍스트 도메인 / Facet Display Value : * name).

알려진 모든 문제 →