Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Chouby on "[Plugin: Polylang] Translation works in NextGen albums, but not in galleries"

$
0
0

Why do you want to write php code? It should work out of the box.

But... The way Nextgen gallery works with Polylang, the string is registered for translation only when it is displayed the first time on frontend. This is not very convenient but you have to:
* define your gallery title in Nextgen gallery admin
* view your gallery title on frontend (this step is mandatory because Nextgen gallery registers the string only here).
* translate your gallery title in the string translations list table

EDIT:
The exact code used by Nextgen gallery to internationalize the gallery title is:

$galleries[$key]->title = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->title), 'gal_' . $galleries[$key]->gid . '_title') ) ;

found at line 577 of nggfunctions.php
But this code should be executed before loading the template so your code should work.


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>