Results 1 to 7 of 7

Thread: Simple Controls Gallery

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Simple Controls Gallery

    Hi all!

    This is my first message to the forum :-)

    Now the problem.

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

    http://www.dynamicdrive.com/dynamici...plegallery.htm

    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:

    Code:
    $playbutton.attr({title:'Play', src:simpleGallery_navpanel.images[1]})
    and going to line 92:

    Code:
    $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):

    Code:
    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?

    Thanks.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    prev and next might be references to functions. did you try doing a find and replace to all instances of it?

  3. #3
    Join Date
    Aug 2004
    Posts
    9,902
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Yep, you should do a search/replace of all instances of the keyword "prev" and "next". Those keywords carry special meaning to the script.
    DD Admin

  4. The Following User Says Thank You to ddadmin For This Useful Post:

    Myrddin (01-05-2009)

  5. #4
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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 :-)

    Thanks.

  6. #5
    Join Date
    Aug 2004
    Posts
    9,902
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    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?
    DD Admin

  7. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Try replacing the Ł with ü
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  8. #7
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Simple Gallery

    Hi,

    Love this script,

    Wish List :

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

    Rik

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •