Online Web Studio with Wireless Imagination

Random image - PrincessDesign!

Category — Design Tips & Tricks

Localization of Slimbox

Slimbox is a light version (with some enhancements like navigation) of Lightbox JS. Lightbox can be described as a simple, unobtrusive script used to overlay images on the current page. You might seen both of them on numerous web sites.

Example of Lightbox:

Lightbox

Example of Slimbox:

Slimbox

But how to localize Slimbox into, for example, Slovenian language?

There are few things to do:

1. Localize the images (Next, Prev, Close)

2. Localize the text Image … of …

3. Change the keyboard keys which control Next, Prev and Close

1. Localize the images (Next, Prev, Close)

Under the folder /images you have four gif files: closelabel.gif, loading.gif, nextlabel.gif and prevlabel.gif. Just open the files (in bold) in yout image editor and delete existing text with localized version. Be also careful about the letter that will used for navigation - in original Slimbox c is used to close the overlay, n for next, p for previous (some other keys are also available) - and underline the appropriate letter.

Original Slimbox labels:

Original Slimbox Labels

Localized Slimbox labels (in Slovenian language):

Lscalized Slimbox labels

You can also download these three files as zip file.

2. Localize the text Image … of …

As you can see under the picture there is an indication of the number of pictures in the gallery and the number of the picture you are viewing.

For example: Image 1 of 5

You can change this in the file slimbox.js, line 144. Just replace words Image and of into appropriate words.

3. Change the keyboard keys which control Next, Prev and Close

In original Slimbox you can navigate between images with the following keyboard keys:

Next: n and right arrow
Previous: p and left arrow
Close: Esc, x and c

These can also be changed in slimbox.js, lines 106-108.

You must use JavaScript Character codes to represent different letters on the keyboard.

Therefore the keys are coded as:

Next: n (case 78) and right arrow (case 39)
Previous: p (case 80) and left arrow (case 37)
Close: Esc (case 27), x (case 88) and c (case 67)

And when you want to localize it, just map the right keys.

Example of Slovenian localization:

Next - Naprej: n (case 78) and right arrow (case 39)
Previous - Nazaj: j (case 74) and left arrow (case 37)
Close - Zapri: Esc (case 27) and z (case 90)

Example of the localized code (slimbox.js, lines 106-108):

case 27: case 90: this.close(); break;
case 37: case 74: this.previous(); break;
case 39: case 78: this.next();

Have fun using Slimbox!

0%
0%

April 17, 2008   No Comments

Email communication

Ermin couldn’t put it better in his post. I would just like to sum up the most important topic: use BCC if you are sending a message to people that don’t know each other & delete previous recipients.

0%
0%

April 10, 2008   No Comments

Free Video Editing Software - VirtualDub

If you need some simple video editing software, you can download VirtualDub. It is free, released under GNU general Public License.

If you look below … the video’s sound was removed with VirtualDub. Fast and easy.

Here is also a web page with some online video editing sites.

0%
0%

April 9, 2008   No Comments

Start Smart Copy&Art - Creative Links

0%
0%

March 28, 2008   No Comments

Flock - The Social Web Browser

If you use Mozilla Forefox on a regular basis and you are also an avid user of flickr, facebook, youtube and other nice web services try the new Flock - The Social Web Browser.
Flock

The migration of data (bookmarks, feeds, usernames) is quite easy so in less than 15 minutes you’ll get a set of new tools that will make your online life easier.

0%
0%

November 12, 2007   2 Comments