We solved this by modifying these lines of codes to add a $translate->_(...)
definition of translate:
$translate = $this->getTranslationInstance($lang);
definition of the method:
private function getTranslationInstance($lang)
{
$lang = $this->getLanguageCode($lang);
return JLanguage::getInstance($lang);
}
definition of getLanguageCode:
private function getLanguageCode($lang)
{
$lang = explode('_', $lang);
$lang[1] = strtoupper($lang[1]);
$lang = implode('-', $lang);
return $lang;
}
This means you need to apply this code every time you update the plugin though. We do this in the virtuemart plugin for custom fields but the same thing can be used for the other plugins as long as they have the $lang variable available. Also note you need to use translation strings for the items you want to translate for this to work.