How to translate the NextGen gallery title with qTranslate-X?

420 views Asked by At

I'm building a new Worpress site with NextGen Gallery. I need it to be multilingual, so I'm using qTranslate-X plugin for translations. But I can not figure out, how to translate NextGen galleries.

I have checked the options 'ngg_album', 'ngg_gallery', 'ngg_pictures' in the qTranslate Configuration. But I can not find, where the translations of these items can be done.

Have I missed something? Can anybody help me to translate NextGen galleries?

Thanks in advance!

1

There are 1 answers

5
user8230352 On BEST ANSWER

The way I woud try to accomplish this is:

1.) Create a custom NextGen template. According to documentation, you need to:

  • Make a copy of the file called gallery.php located here: /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view

  • Make a new folder called nggallery in your theme folder: /wp-content/themes/[theme you have activated]/nggallery

  • Place your copy of the file called gallery.php here

  • Rename "gallery.php" to "gallery-templatename.php"

  • To use, use this shortcode: [ nggallery id=1 template=templatename ]

2.) Now in the gallery-templatename.php template, modify the

echo $gallery->slideshow_link_text to _e($gallery->slideshow_link_text).

3.) All that is left is to use qTranslate language tags in gallery title like [:en]English text[:de]German Text. For more information about these language tags, check qTranslate documentation.