Multilingual text of "save image link" in slimbox
Posted: 10 Feb 2012, 20:00
Hello,
I use phoca gallery component. And slimbox for images detail view.
I have set up an option to download images from detail view in slimbox.
I did that by adding additional code to slimbox.js, as suggested on official web-site:
But in this case, the "save image" text is displayed in English.
Can you please suggest, how can I insert a translatable variable, instead of "Download this image"?
UPD
I asked same question on joomla forum and was advised to do the following:
But there are lots of view.html.php in gallery component, so I don't really know wich one to modify.
here is the link of discussion http://forum.joomla.org/viewtopic.php?f=617&t=694917
I use phoca gallery component. And slimbox for images detail view.
I have set up an option to download images from detail view in slimbox.
I did that by adding additional code to slimbox.js, as suggested on official web-site:
Code: Select all
// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
Slimbox.scanPage = function() {
$$($$("a").filter(function(el) {
return el.rel && el.rel.test(/^lightbox/i);
})).slimbox({/* Put custom options here */}, function(el) {
return [el.href, el.title + '<br /><a href="' + el.href + '">Download this image</a>'];
}, function(el) {
return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
});
};
window.addEvent("domready", Slimbox.scanPage);Can you please suggest, how can I insert a translatable variable, instead of "Download this image"?
UPD
I asked same question on joomla forum and was advised to do the following:
Code: Select all
In the INI file you have: COM_EXMAPLE_DOWNLOAD_THIS="Download this image"
In the view file (view.html.php) you put: JText::script('COM_EXMAPLE_DOWNLOAD_THIS');
In the JS file you put Joomla.JText._('COM_EXMAPLE_DOWNLOAD_THIS')here is the link of discussion http://forum.joomla.org/viewtopic.php?f=617&t=694917