[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 http://mydomain.com/gallery/ in the default language becomes http://mydomain.com/xx/gallery/ 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?
- The topic ‘[Plugin: NextGEN Gallery] Multilanguage customization problems’ is closed to new replies.