I have a website and for a product like "shirts" there is a way to get a discount. (This is implemented by a custom option). I'm importing all the products and the options programmatically. But now in the other languages it has to be changed. Because it is the same sentence it would be nice if it could be translated whitin a .csv file. But how do I change te code? In the picture the custom option "Discount brest logo". But In German I want there the text "Rabatt.."
I saw in the browser there is a reference to class="label admin__field-label.
I found out that in "magento/module-catalog/Block/Product/View/Options/Type/Select.php" this piece of code is creating the text of the custom option:
$this->pricingHelper->currencyByStore($_value->getPrice(true), $store, false) . '" />' . '<label class="label admin__field-label" for="options_' . $_option->getId() . '_' . $count . '"><span>' . $_value->getTitle() . '</span> ' . $priceStr . '</label>';
So two questions:
- Is this the right place for translate ""Discount brest logo"??
- But how do I translate "$_value->getTitle() ." correctly so I can use te .csv file?