Support » Plugins » [Plugin: NextGEN Gallery] Multilanguage customization problems

  • I want to use NextGen Gallery in a multilanguage environment – using qTranslate to switch between languages. I have successfully modified pre-1.0 versions of NextGen Gallery, but I am struggling with version 1.0.2. I am using WordPress 2.7 and the latest version of qTranslate 2.1.3.

    Getting NextGen Gallery to work multilingually consists of two tasks: the first is to ensure that image descriptions and alttext appear in the correct language only. I have succeeded in this objective, using the __() and _e() Gettext WordPress core functions. However, I am struggling with the second task, namely ensuring that when you click on a thumbnail or on the next or prev navigation buttons when using the ImageBrowser, that the images display in the correct language. Currently, if I click on a Gallery thumbnail in a non-default language (qTranslate defines a default language, and any number of non-default languages) the correct image will display in the Imagebrowser, but in the default language. Also, once the ImageBrowser is displayed and I click on the “Next” or “Prev” buttons (correctly displayed in the non-default language – in my case Welsh) the correct image is displayed, but again in the default language (in my case English).

    qTranslate has a function that converts Urls to the correct type to display the language required. So in the default language becomes in the non-default language, where xx is the two character language code. I have applied this function in a number of places in imagebrowser.php, gallery.php, and nggfunctions.php files. Even though the href’s get converted to the correct format (as shown by the Url displayed at the bottom of the browser window on mouseover of the gallery thumbnail or “Next” or “Prev” anchor) when I click on the link the href is ignored/over-ridden and the displayed page always reverts to the default language. I’m sure the solution lies somewhere in nggfunctions.php – but I’m struggling to find it.

    A secondary issue is that I have used templates – and my website is using the gallery-qtrans.php template file but not my imagebrowser-qtrans.php file. How is the imagebrowser template file activated?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Using [imagebrowser id=3 template=qtrans] activates the template imagebrowser – but I can’t put this code in my gallery page otherwise I get the thumbnails and imagebrowser together. I only want the imagebrowser to open once a thumbnail has been clicked. Where then do I put the above code – because there is no user-generated page that I can insert this code into.

    I also use qTranslate, but havent come anywhere near the stage that you seem to be, yet. Please keep replying to your own posts to show us how you eventually overcome all these problems.

    I haven’t the time at the moment to post a detailed explanation of what I did to get around this problem. However, I didn’t get any joy by blitzing URLs with convertURL. Instead I used Wp-highslide (along with Nextgen gallery and highslide itself) to get around the problem. There’s a fair bit of customization of wp-highslide involved to get it to work right – but I managed to get image captions to show in the correct language as well as the highslide controls. If I get the time I’ll give a detailed explanation of what I did at some point.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] Multilanguage customization problems’ is closed to new replies.