lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.2k stars 1.77k forks source link

Translation of bottom text in french #670

Closed xillibit closed 4 years ago

xillibit commented 5 years ago

I'am wondering how to translate in french the text in bottom of image of the lightbox :+1: traduction_franaise

How to translate this text ?

AppDeveloperVM commented 5 years ago

Hey there, if you look inside ' lightbox.js ' file, in line 43,or in the Lightbox default settings, there is a line where you can have a custom message por the pagination :

Lightbox.defaults = {
...
albumLabel: 'Image %1 of %2',
..
}

The text with the % symbol followed by numbers are the actual page, and the total of pages. The text 'Image' can be changed.

Also you can update this parameters inside a new JS, not necessarily in the original.

lokesh commented 4 years ago

Closing out old issues.

Controlling the label is available as an option and doesn't require modifying the source code: https://lokeshdhakar.com/projects/lightbox2/#options

<script>
    lightbox.option({
      'albumLabel': 'Image %1 de %2'
    })
</script>