News:

Looking for documentation? Take a look on our wiki

Main Menu

Custom field values translations in backend.

Started by mvladimir, April 29, 2017, 18:04:37 PM

Previous topic - Next topic

mvladimir

VM 3.2.1

There is a problem with translation of values of custom field in backend.

Test case:
1. Add new custom field, for instance VM_FIELD1_LABEL, field type text.
2. Add default value - VM_FIELD1_VALUE;VM_FIELD2_VALUE;VM_FIELD3_VALUE
3. Set option "Is a list?" = YES
3. Add translations in Joomla->Extensions->Languages->Overides for the label and values
4. Add custom field to some product

In the backend the label will be translated but not values

Possible solution
line 650 in administrator/components/com_virtuemart/models/customfields.php
$options[] = array('value' => $val, 'text' => $val);
has to be replaced with
$options[] = array('value' => $val, 'text' => vmText::_($val));

Milbo

We cannot translate the keys in the BE. it makes only sense to show the translation, but not to show the translated text within the edit field. Else you would override it, with the translated text
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/