Support » Plugins » NextGen Multilingual capabilities

  • I have posted previously on an existing thread without response – so let’s see where we get with a new thread.

    I want to develop bilingual or multilingual WordPress blogs and websites using a Language Switching plugin such as Language Switcher or qTranslate. I’ve experimented at length – and yet can only get the admin interface to appear in the correct language. An example of the problem is that English-only “[Show as slideshow]” or “[Show picture list]” links appear above the gallery images on a page displaying a gallery.

    I know next to nothing about php but I’m guessing that the relevant areas are of code are here:

    In ngginstall.php:

    $ngg_options[‘galTextSlide’] = __(‘[Show as slideshow]’,’nggallery’); // Text for slideshow
    $ngg_options[‘galTextGallery’] = __(‘[Show picture list]’,’nggallery’); // Text for gallery

    Then in nggallery.php:

    // Load language
    function nggallery_init ()
    if (function_exists(‘load_plugin_textdomain’)) {
    if ( !defined(‘WP_PLUGIN_DIR’) ) {
    load_plugin_textdomain(‘nggallery’,’wp-content/plugins/’ . NGGFOLDER . ‘/lang’);
    //load_plugin_textdomain(‘nggallery’, str_replace( ABSPATH, ”, dirname(__FILE__) ) . ‘/lang’);
    } else {
    load_plugin_textdomain(‘nggallery’, false, dirname(plugin_basename(__FILE__)) . ‘/lang’);

    //read the options
    $ngg_options = get_option(‘ngg_options’);

    // Load the admin panel
    if (is_admin()) {

    include_once (dirname (__FILE__).”/ngginstall.php”);

    // check for upgrade
    if( get_option( “ngg_db_version” ) != NGG_DBVERSION )

    if (IS_WP25)
    include_once (dirname (__FILE__).”/admin/wp25/admin.php”);
    include_once (dirname (__FILE__).”/admin/admin.php”);

    } else {

    // Load the gallery generator
    include_once (dirname (__FILE__).”/nggfunctions.php”);

    I am correct in reading into this that ngginstall.php only gets called if the admin panel is displayed? Would this account for why the translations only appear on the admin side? I’ve tested using the German translations as well as my own language files – with the same result.

    It would be a big shame if a minor bug prevented this great plugin working in conjunction with the likes of Language Switcher or qTranslate – and therefore prevented its use in multilingual blogs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • the text “Show as slideshow” / “Show picture list” is set in the options menu. If you need to tranlate it , go to nggfunction.php :

    line 322

    $out .= '<div class="slideshowlink"><a class="slideshowlink" href="' . $nggRewrite->get_permalink($args) . '">'.$ngg_options['galTextSlide'].'</a></div>';
    and replace

    $out .= '<div class="slideshowlink"><a class="slideshowlink" href="' . $nggRewrite->get_permalink($args) . '">'.__($ngg_options['galTextSlide']).'</a></div>';
    line 236

    $out .= '<div class="slideshowlink"><a class="slideshowlink" href="' . $nggRewrite->get_permalink($args) . '">'.$ngg_options['galTextGallery'].'</a></div>';

    and replace here

    $out .= '<div class="slideshowlink"><a>get_permalink($args) . '">'.__($ngg_options['galTextGallery']).'</a></div>';

    Thanks a lot for the prompt reply. In addition to your suggestion I’ve also amended the po file so that the [Show as slideshow] and [Show picture list] translation strings are matched to their occurrences in the nggfunctions.php file (lines 322 and 236) as well as the ngginstall.php file. However, I still didn’t get any success.

    Ideally, I would like to use [lang_xx] tags on the options page (as used by Language Switcher and qTranslate) to allow me to enter whatever string I choose in whatever language, to appear above the gallery thumbnails or slideshow. This might be a big ask – but it would be great to at least have the default strings translate OK.

    I think your plugin is excellent – and I will continue to use it on monolingual blogs/websites, but it would be great if all features worked multilingually. I’m not aware of any other gallery plugin that even comes close to providing this functionality.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘NextGen Multilingual capabilities’ is closed to new replies.