Visão geral do problema
Se você estiver usando álbuns do NextGen Gallery Pro, perceberá que os títulos das galerias não estão sendo traduzidos corretamente nos idiomas secundários.
Solução alternativa
Este problema foi corrigido. Atualizar para a versão mais recente resolve isso no seu site, portanto, você só precisa desta solução alternativa se ainda não puder atualizar.
Por favor, certifique-se de ter um backup completo do site antes de prosseguir.
- Abra o arquivo …/wp-content/plugins/nextgen-gallery-pro/templates/DisplayTypes/Albums/default.php.
- Procure a linha 51.
- Substitua:
PHP
<?php print wp_kses( $entity->title, ImagelyNGGDisplayI18N::get_kses_allowed_html() ); ?>
- Por:
PHP
<?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 a página do front-end onde você adicionou seu álbum.
- Vá para WPMLTradução de Strings e traduza a nova string.