News:

Looking for documentation? Take a look on our wiki

Main Menu

Translation 'Manufacturer' on productdetails page

Started by EIF, May 30, 2018, 13:12:14 PM

Previous topic - Next topic

EIF

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.




Studio 42

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

EIF

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.

Studio 42

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