View Full Version : Simple Controls Gallery

01-04-2009, 11:21 PM
Hi all!

This is my first message to the forum :-)

Now the problem.

I've downloaded the Simple Controls Gallery available at this link:


It works like a charm... but the problem I have is that I want to change that "Prev", "Next", "Pause" and "Play" labels in order to translate them to my language.

I see the file that has to be changed is the simplegallery.js. I've been able to change the "Pause" and "Play" labels. Going to line 87:

$playbutton.attr({title:'Play', src:simpleGallery_navpanel.images[1]})

and going to line 92:

$playbutton.attr({title:'Pausa', src:simpleGallery_navpanel.images[3]})

But the "Prev" and "Next" labels is not so easy. It looks like this is the line that should have to be changed (line 146):

var title=(i==0? 'Prev' : (i==1)? (setting.ispaused? 'Play' : 'Pause') : 'Next')

I don't know why, but if I try to change the labels then I loose the functionality of going to the next/previous image. Anybody knows why?

Could anybody help me?


01-04-2009, 11:35 PM
prev and next might be references to functions. did you try doing a find and replace to all instances of it?

01-05-2009, 09:29 AM
Yep, you should do a search/replace of all instances of the keyword "prev" and "next". Those keywords carry special meaning to the script.

01-05-2009, 07:36 PM
Hi again,

Sorry for not choosing the correct forum for this post.

Yep, you're right, changing all the ocurrences of "prev" and "next" worked, now it works perfect...

Well, 100% perfect not yet :-) because "next" in my language is written "segŁent" ... and yes, you guessed it... the "Ł" character gives problems :-)

I've made some tests and the only way I've found to make the script work is to renounce to the "Ł" char.

It's obvious that the creator of the script never thought on this possibility... I think screen labels should not have special meaning for the script, that's because they are labels :-)


01-06-2009, 09:15 AM
Hmm are you saying if you substitute "next" with "segŁent" (with the double dots atop "u"), it no longer works, and only by using a regular "u" does it work?

01-06-2009, 09:38 AM
Try replacing the Ł with ü

01-15-2009, 09:12 PM

Love this script,

Wish List :

Used an 'if else' in case an image was not there or broken and used a default one.