Gallery (I18N enabled)

This plugin allows you to define multiple image galleries and display them in various ways:

  • supports multiple galleries (like GSgallery)
  • supports selection of images from data/uploads and any sub directories
  • supports sorting of images (like the pages in I18N Navigation navigation structure)
  • supports the I18N plugin, i.e. multiple languages
  • supports a title, a description and tags per image
  • supports filtering of a gallery by one or multiple tags
  • displays galleries in multiple ways (e.g. fancybox, prettyPhoto, s3Slider)
  • some galleries (e.g. fancybox, prettyPhoto) degenerate nicely with Javascript turned off
  • displays thumbnails similarly to (but can be overridden with CSS)
  • allows to set any thumbnail and image sizes (per gallery)
  • automatically scales images according to these sizes
  • can automatically start slide shows
  • can display a specific image of a gallery
  • supports a gallery preview (like view for Edit Page)
  • all files reside in standard folders (images in data/uploads, thumbnails in data/thumbs, ...)
  • supports full undo after saving, deleting, renaming galleries
  • no Flash, no database required


  • Slideshow, both title and description displayed: prettyPhoto
  • Display images with title and navigation: FancyBox
  • In-page slideshow with title and description: s3Slider
  • Slideshow using full browser area: SuperSized
  • Easily filtered with e.g. request parameter: FancyBox (filtered)
  • Show a specific image of a gallery: prettyPhoto (Image 4)
  • Switch off Javascript and visit FancyBox to see how the gallery works even without Javascript.


Download I18N Gallery and unzip it into your plugins directory.

Enable sitewide cookies in your gsconfig.php and make sure, your website base URL in the Settings matches the URL that you use to login.

If you encounter problems, check

  • if the file plugins/i18n_gallery/loadtab.php was copied to admin
  • if a directory data/i18n_gallery exists and is read- and writeable
  • if a directory backups/i18n_gallery exists and is read- and writeable
  • if the file plugins/i18n_gallery/gallery.xml was copied to data/pages (gallery.xml is not used for 2.1+)
  • if your template calls get_header()
  • if there is a jQuery.noConflict(); in your javascript code - remove it!

and correct it.

If your template includes jQuery, it must be at least version 1.4, it must be included before the get_header() call and you should have switched on "Do not include jQuery" in the Gallery Settings.


Go to the Galleries tab in your GetSimple administration and create a new gallery, add images and give it a title, a name and a type.

Add the following in your page (replace my-gallery-name with the name of the gallery):

(% gallery name=my-gallery-name %)

To add a gallery to your template, use

<?php get_i18n_gallery_header('my-gallery-name'); ?>

in your HTML header and

<?php get_i18n_gallery('my-gallery-name'); ?>

in the HTML body (e.g. the sidebar).

Add a link consisting of an image of a gallery by adding the following to your page (the url normally is the page which contains the gallery, but it can be any page):

(% gallerylink name=my-gallery-name url=my-gallery-slug thumb=0 %)

(omit thumb to output the title instead of a thumbnail or use thumb=random for a random thumbnail)

To add a link in your template, use

<?php get_i18n_gallery_link('my-gallery-name',
          array('url'=>'my-gallery-slug', 'thumb'=>0)); ?>

Extended Usage

You can customize the gallery call with the following parameters:

  • type - the type of gallery to show: cycle, fancybox, prettyphoto, s3slider or supersized

  • width - maximum width of images in pixels, larger ones will be scaled down
  • height - maximum height of images in pixels, larger ones will be scaled down
  • pic - show this image immediately, will stop slide show: 0, 1, 2, ...
  • tags - only show the images tagged with these tags, multiple tags have to be separated by comma
  • id - use it as an identifier, if you include a gallery more than once on a page

For gallery types offering slide shows:

  • interval - time interval between slides in milliseconds (ms)
  • autostart - if the slide show should be automatically started: true, false

For gallery types displaying thumbnails:

  • thumbwidth - maximum width of the thumbnails in pixels
  • thumbheight - maximum height of the thumbnails in pixels
  • thumbtitles - if 0, false or 'false', don't show titles, otherwise show titles below thumbs
  • thumb - show only n-th image as thumbnail (version 0.7+): 0, 1, 2, ..., random (switches off pagify since 1.7.3)
  • pagify - if not 0, false or 'false', create a pagination for the thumbnails (see pagesize)
  • pagesize - the number of thumbnails on one page (only if pagify is switched on)

For gallery links only name, thumb, thumbwidth, thumbheight and the following parameters are used (omitting thumb will output the title instead of a thumbnail):

  • url - the slug of the page with the gallery (required)
  • parent - the parent slug of the page with the gallery (optional)

All parameters except type are only used, if supported by the selected gallery type.


(% gallery name=my-gallery type=prettyphoto autostart=true %)

or (make sure to have the same parameters in both function calls):

<?php get_i18n_gallery_header('my-gallery',
          array('type'=>'prettyphoto', 'autostart'=>true)); ?>
<?php get_i18n_gallery('my-gallery',
          array('type'=>'prettyphoto', 'autostart'=>true)); ?>

The following URL parameters are recognized, if they are not given in the call:

  • name - the name of the gallery
  • type - the type of gallery to show (see above)
  • imagetags - only show the images tagged with these tags (see above) (before version 1.5.1 this parameter was named tags, which clashed with I18N Search)

The following URL parameters are always recognized and override parameters in the call:

  • pic - show this image immediately, will stop slide show: 0, 1, 2, ... or (if you have multiple galleries on one page) galleryname:0, galleryname:1, ...

Assuming you have a page gallery with the following code (this is initially copied to your pages directory, if you do not yet have a page with this name)...

(% gallery %)

... you can call a gallery mygallery with