- Estado
- Esperando al autor
- Plugin/tema relacionado
- NextGen Gallery
- Etiquetas de temática
- Compatibility
Resumen del problema
Si utiliza álbumes de NextGen Gallery Pro, verá que los títulos de las galerías no se están traduciendo correctamente en los idiomas secundarios.
Solución alternativa
Por favor, asegúrese de tener una copia de seguridad completa de su sitio antes de continuar.
- Abra el archivo …/wp-content/plugins/nextgen-gallery-pro/templates/DisplayTypes/Albums/default.php.
- Busque la línea 51.
- Reemplace:
<?php print wp_kses( $entity->title, ImagelyNGGDisplayI18N::get_kses_allowed_html() ); ?>
- Por:
<?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() ); ?> - Visite la página del front-end donde añadió su álbum.
- Vaya a WPML > Traducción de cadenas y traduzca la nueva cadena.