I have posted previously on an existing thread without response - so let's see where we get with a new thread.
I want to develop bilingual or multilingual WordPress blogs and websites using a Language Switching plugin such as Language Switcher or qTranslate. I've experimented at length - and yet can only get the admin interface to appear in the correct language. An example of the problem is that English-only "[Show as slideshow]" or "[Show picture list]" links appear above the gallery images on a page displaying a gallery.
I know next to nothing about php but I'm guessing that the relevant areas are of code are here:
In ngginstall.php:
$ngg_options['galTextSlide'] = __('[Show as slideshow]','nggallery'); // Text for slideshow
$ngg_options['galTextGallery'] = __('[Show picture list]','nggallery'); // Text for gallery
Then in nggallery.php:
// Load language
function nggallery_init ()
{
if (function_exists('load_plugin_textdomain')) {
if ( !defined('WP_PLUGIN_DIR') ) {
load_plugin_textdomain('nggallery','wp-content/plugins/' . NGGFOLDER . '/lang');
//load_plugin_textdomain('nggallery', str_replace( ABSPATH, '', dirname(__FILE__) ) . '/lang');
} else {
load_plugin_textdomain('nggallery', false, dirname(plugin_basename(__FILE__)) . '/lang');
}
}
}
//read the options
$ngg_options = get_option('ngg_options');
// Load the admin panel
if (is_admin()) {
include_once (dirname (__FILE__)."/ngginstall.php");
// check for upgrade
if( get_option( "ngg_db_version" ) != NGG_DBVERSION )
ngg_upgrade();
if (IS_WP25)
include_once (dirname (__FILE__)."/admin/wp25/admin.php");
else
include_once (dirname (__FILE__)."/admin/admin.php");
} else {
// Load the gallery generator
include_once (dirname (__FILE__)."/nggfunctions.php");
I am correct in reading into this that ngginstall.php only gets called if the admin panel is displayed? Would this account for why the translations only appear on the admin side? I've tested using the German translations as well as my own language files - with the same result.
It would be a big shame if a minor bug prevented this great plugin working in conjunction with the likes of Language Switcher or qTranslate - and therefore prevented its use in multilingual blogs.