Author Topic: Translation 'Manufacturer' on productdetails page  (Read 313 times)

EIF

  • Jr. Member
  • **
  • Posts: 68
Translation 'Manufacturer' on productdetails page
« 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:

Code: [Select]
// 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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3241
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: Translation 'Manufacturer' on productdetails page
« Reply #1 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 :
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 68
Re: Translation 'Manufacturer' on productdetails page
« Reply #2 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.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3241
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: Translation 'Manufacturer' on productdetails page
« Reply #3 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