Hi,
I would like to translate the label "Products" on the search results page. There are a line of check boxes like articles, contacts .... and products. The constant of articles is JGLOBAL_ARTICLES but I can not find the constant for products.
The "Products" is generated from \plugins\search\virtuemart\virtuemart.php. The other search filter options are from Joomla search plugins and their language files.
The solution should be something like replacing "Products" with JText::_('COM_VIRTUEMART_SEARCH_PRODUCTS') in line 30 of the file YourJoomlaRoot\plugins\search\virtuemart\virtuemart.php.
But just doing that and adding the corresponding key/string i.e. to the _mod.virtuemart_search.ini didn't work for me (I always got a syntax error).
Seems to be too complicated for me (php-illiterate) :) ...let me know if you manage to get it working.
PS: Problably plugin files to translate plugin text are have to be created, in this case i.e:
administrator\language\en-GB\en-GB.plg_search_virtuemart.ini
administrator\language\en-GB\en-GB.plg_search_virtuemart.sys.ini
hi,
this works for me (inspired by" \plugins\search\contact\contact.php"):
in "\plugins\search\virtuemart\virtuemart.php" change line 25-33 (old):
class plgSearchVirtuemart extends JPlugin
{
function onContentSearchAreas() {
static $areas = array(
'virtuemart' => 'Products'
);
return $areas;
}
to this (new):
class plgSearchVirtuemart extends JPlugin
{
function onContentSearchAreas() {
$this->loadLanguage();
static $areas = array(
'virtuemart' => 'PLG_SEARCH_VIRTUEMART_PRODUCTS'
);
return $areas;
}
and add
PLG_SEARCH_VIRTUEMART_PRODUCTS="Products"
to your en-GB.override.ini and translations to other language .ini's
Thank you for this. Works for me, too. I'll suggest it be included in the core. :)
Hello,
txs for the tip.
Added in the core.