- Trạng thái
- Đang chờ nhà phát triển
- Plugin/giao diện liên quan
- NextGen Gallery
- Thẻ chủ đề
- Compatibility
Tổng quan về lỗi
Nếu bạn đang sử dụng các album NextGen Gallery Pro, bạn sẽ thấy các tiêu đề thư viện không được dịch chính xác trong các ngôn ngữ phụ.
Giải pháp tạm thời
Vui lòng đảm bảo có bản sao lưu toàn bộ trang web của bạn trước khi tiếp tục.
- Mở tệp …/wp-content/plugins/nextgen-gallery-pro/templates/DisplayTypes/Albums/default.php.
- Tìm dòng 51.
- Thay thế:
<?php print wp_kses( $entity->title, ImagelyNGGDisplayI18N::get_kses_allowed_html() ); ?>
- Bằng:
<?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() ); ?> - Truy cập trang giao diện người dùng nơi bạn đã thêm Album của mình.
- Đi tới WPML > Dịch chuỗi và dịch chuỗi văn bản mới.