Enabling WPML translation for an AJAX gallery page

AJAX gallery pages (such as the Expression and Photolux Grid Gallery pages) require building a specific category structure in order to get the different translated versions of the items loaded depending on the language selected.

For example, if you have two languages – English and French, and if you have three categories, called:
in English:
Cat1 en
Cat2 en
Cat3 en

and the translated categories in French would be:
Cat1 fr
Cat2 fr
Cat3 fr

then create a parent category for each of the languages, you should have this hierarchy:
Parent En Category
—Cat1 en
—Cat2 en
—Cat3 en

and
Parent Fr Category
—Cat1 fr
—Cat2 fr
—Cat3 fr

After that when creating each of the portfolio items for the gallery, you select the relevant translated category for each of them.
And finally, in the “Display portfolio items from categories” field of the English gallery page you have to select select the “Parent En Category” category and in the French version of the gallery select the “Parent Fr Category”. In this way, in the English gallery page only the items assigned to the English category will be loaded and in the French gallery only the items assigned to the French category will be loaded.

Was this useful? 3