News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Translationable list options for custom field?

Started by panoss, September 11, 2016, 14:18:12 PM

Previous topic - Next topic

panoss

I made a custom field of type 'String', is List = true, and in 'Default', instead of the options I(Home;Office;Outdoor) I put a variable: COM_VIRTUEMART_FURNITURE_TYPE_VALUES

In administrator\language\overrides\en-GB.override.ini, I set the COM_VIRTUEMART_FURNITURE_TYPE_VALUES = "Home;Office;Outdoor";

In the Product>Custom fields, instead of the list 'Home Office Outdoor' I get the variable COM_VIRTUEMART_FURNITURE_TYPE_VALUES.
Which means they 're not translated.

I also tried putting them separately:
In my custom field 's 'Default':
COM_VIRTUEMART_FURNITURE_TYPE_VALUE_1;COM_VIRTUEMART_FURNITURE_TYPE_VALUE_2;COM_VIRTUEMART_FURNITURE_TYPE_VALUE_3;
In administrator\language\overrides\en-GB.override.ini:
COM_VIRTUEMART_FURNITURE_TYPE_VALUE_1 = "Home"
COM_VIRTUEMART_FURNITURE_TYPE_VALUE_2 = "Office"
COM_VIRTUEMART_FURNITURE_TYPE_VALUE_3 = "Outdoor"

Am I doing something wrong or they really can't be translated?
Virtuemart 3.2.4 on Joomla! 3.8.0

panoss

#1
Unfortunately, I had to modify the model VirtueMartModelCustomfields (\administrator\components\com_virtuemart\models\customfields.php).
Function displayProductCustomfieldBE line 632.
Changed from:
$options[] = array('value' => $val, 'text' => $val);
to:
$options[] = array('value' => $val, 'text' => vmText::_($val));
Virtuemart 3.2.4 on Joomla! 3.8.0