• Resolved robindemey

    (@robindemey)


    Hi

    I’m using qtranslate for translating my website.
    In the galleries, the picture titles and descriptions translate correct.

    The gallery description and title does not.
    What am I doing wrong?

Viewing 1 replies (of 1 total)
  • Thread Starter robindemey

    (@robindemey)

    I found a solutions.

    The gallery title and description are placed in the database like that in plugins\nextgen-gallery\admin\manage.php:
    $wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET title= '%s', slug= '%s' WHERE gid = %d", esc_attr($_POST['title']), $slug, $this->gid) );
    and
    $wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET galdesc= '%s' WHERE gid = %d", esc_attr( $_POST['gallerydesc'] ), $this->gid) );

    I removed the esc_attr(). This makes that the codes for translation (<!–:–>) will be correctly placed in the database.

    For showing the title and description on my gallery page, I used the following code:

    <h1><?php echo html_entity_decode ( nggGallery::i18n( stripslashes($gallery->title))); ?></h1>
    <p><?php echo html_entity_decode ( nggGallery::i18n( stripslashes($gallery->description))); ?></p>

    If you would just use echo $gallery->description, then you’d see the complete description with all the translations.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] Translation gallery doesn't work, pictures does’ is closed to new replies.