- Trạng thái
- Đang chờ nhà phát triển
- Plugin/giao diện liên quan
- Motors
- Thẻ chủ đề
- Compatibility
Tổng quan về lỗi
Khi sử dụng giao diện Motors, bạn có thể gặp tình trạng một số nhãn danh mục danh sách không hiển thị bản dịch trên giao diện người dùng, mặc dù đã được dịch trong giao diện WPML Dịch Chuỗi.
Giải pháp tạm thời
Vui lòng đảm bảo bạn có bản sao lưu toàn bộ trang web trước khi tiếp tục.
- Mở tệp app/public/wp-content/plugins/motors-elementor-widgets/templates/widgets/single-listing/listing-data.php
- Tìm dòng 91.
- Thay thế:
<td class="t-label"> <?php echo esc_html( $single_name ); ?></td>
- Bằng:
<?php // WPML Workaround for compsupp-7432 if ( class_exists('Sitepress') ) { $textdomain = 'motors'; $string_name = 'Motors - WPML String: '.substr($single_name, 0, 20); if ( apply_filters('wpml_default_language', NULL ) == apply_filters( 'wpml_current_language', NULL )) { do_action( 'wpml_register_single_string', $textdomain, $string_name, $single_name ); } // Apply the translation to the string $single_name = apply_filters('wpml_translate_single_string', $single_name , $textdomain, $string_name); } ?> <td class="t-label"> <?php echo esc_html( $single_name ); ?></td> - Truy cập trang gặp sự cố bằng ngôn ngữ gốc, điều này sẽ đăng ký chuỗi văn bản.
- Truy cập trang WPML > Dịch chuỗi và dịch chuỗi văn bản mới (dưới textdomain motors).