- 상태
- 개발자 대기 중
- 관련 플러그인/테마
- NextGen Gallery
- 주제 태그
- Compatibility
문제 개요
NextGen Gallery Pro 앨범을 사용하는 경우 보조 언어에서 갤러리 제목이 올바르게 번역되지 않는 문제가 발생합니다.
임시 해결 방법
진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/nextgen-gallery-pro/templates/DisplayTypes/Albums/default.php 파일을 여세요.
- 51번째 줄을 찾으세요.
- 다음을:
<?php print wp_kses( $entity->title, ImagelyNGGDisplayI18N::get_kses_allowed_html() ); ?>
- 다음으로 변경하세요:
<?php // WPML Workaround for compsupp-7540 if (class_exists('Sitepress')) { $string = $entity->title; $textdomain = 'WordPress'; $string_name = 'WPML Workaround: '.substr($string, 0, 20); $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', $textdomain, $string_name, $string ); } // Apply the translation to the string $entity->title = apply_filters('wpml_translate_single_string', $string , $textdomain, $string_name); } ?> <?php print wp_kses( $entity->title, ImagelyNGGDisplayI18N::get_kses_allowed_html() ); ?> - 앨범을 추가한 프런트엔드 페이지를 방문하세요.
- WPML > 문자열 번역으로 이동하여 새 문자열을 번역하세요.