Translate Photo Gallery Plugin Using WPML

Introduction

Photo Gallery is one of the great plugins to create your image galleries in WordPress. Its integration with WPML will allow you to translate your galleries.

What you will need

  • Photo Gallery plugin (version 2.1.31 or above).
  • A recent version of WPML (version 3.3.8 or above) and the String Translation add-on.
  • WordPress (version 4.5.2 or above).

Essential resources

Getting started

  • Install and activate the WPML plugin.
  • Install and activate the Photo Gallery plugin.

Translation

We will be creating two galleries: one will be inserted in our default language gallery page and the other into our secondary language gallery page.

Create the image gallery (for the default and secondary languages)

  1. On your WordPress dashboard, navigate to “Photo Gallery” > “Add Galleries/Images” and click on the “Add new” button.

Add new gallery

  1. Fill in the “Name” field and the “Description” field (in case you want to add a description to your gallery).
  2. Click on the “Add images” button.

Gallery name ana description

  1. Click on the “Upload files” button and choose the images that you want to add to your gallery.
  2. Select the images that you want to add to your gallery or click on the “Select all” button.
  3. Click on the “Add selected images to gallery” button; add your images titles, description and tags.

Add selected images to gallery

  1. Click on the “Save” button. With that, we have created the image gallery that will be inserted into our default language (in this tutorial it is “English”) gallery page.
  2. Repeat the same process to create the secondary language gallery (in our case, it is French). Remember to add your translated textual content when creating the gallery.

Create and translate the gallery page

    1. Navigate to “Pages” > “Add New”.
    2. Add the page title (Buildings gallery).
    3. Click on the “Insert photo gallery” icon Insert gallery icon .

Add default language gallery page

    1. From the gallery drop down menu, select the first gallery that we have created (in our case, it is “Buildings gallery”) and click on the “Insert” button.

Insert default language gallery

      1. Click on the “Publish” button.
      2. Click on the Plus icon icon, found in the language meta-box on the right, to translate the gallery page.

Add translation to the gallery page

  1. Click on the “copy content from English” button and edit the loaded text with your translation in the title and the body.

Add your translated text to the gallery page

  1. Delete the gallery shortcode and click on the “Insert photo gallery” icon Insert gallery icon . Choose the gallery that we created for the secondary language (FR-Buildings).

Insert your secondary language gallery

  1. Click on the publish button.

Now, we have loaded each instance of the gallery that we created into the right page and will display the correct gallery on each of them.

Orignal Article Posted On: WPML

Be the first to comment on "Translate Photo Gallery Plugin Using WPML"

Leave a comment

Your email address will not be published.


*