WPML
الحالة
في انتظار المطور
الإضافة/القالب ذو الصلة
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 > ترجمة النصوص وترجم السلسلة النصية الجديدة.

جميع المشاكل المعروفة →