VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: EIF on May 30, 2018, 13:12:14 PM

Title: Translation 'Manufacturer' on productdetails page
Post by: EIF on May 30, 2018, 13:12:14 PM
On the productdetails page the manufacterer is displayed. I use the Dutch language for Virtuemart, so the Dutch translation is displayed.

The standard code used for this:

// Manufacturer of the Product
    if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
        echo $this->loadTemplate('manufacturer');
    }
    ?><br>


But how can I change the translation of the word 'Manufacturer' to another word? Some versions before it used the variable COM_VIRTUEMART_MANUFACTURER or COM_VIRTUEMART_MANUFACTURER_NAME. That is still translated to the correct word I want to display.
It looks like it useing another variable, but I can't find it, even when searching trough all the .ini files... really strange.

I am using VM 3.2.14.



Title: Re: Translation 'Manufacturer' on productdetails page
Post by: Studio 42 on May 30, 2018, 14:05:23 PM
Original file is JOOMLAROOT/components/com_virtuemart/views/productdetails/tmpl/default_manufacturer.php and dont have any translated word.
COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL is the only one displaying Manufacturer
If you need , you should add this code :
echo vmText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL ');
before the foreach in the code.
Note that it's better to do an override in the template and perhaps this file override already exist in YOURtemplate/html/com_virtuemart/productdetails/default_manufacturer.php
Title: Re: Translation 'Manufacturer' on productdetails page
Post by: EIF on June 01, 2018, 19:11:10 PM
I used the "COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL" variable before and it is translated as I want it to. But it doesn;t show up in the productdetails.
But i noticed the language .ini file in de administration folder also has this variable. Seems to be it using this one now, instead of the normale language folder.
Title: Re: Translation 'Manufacturer' on productdetails page
Post by: Studio 42 on June 02, 2018, 17:55:31 PM
You can add an overrride in Joomla and use your own key in the file, eg. MANUFACTURER_LBL
See https://docs.joomla.org/J3.x:Language_Overrides_in_Joomla how to add your own translations