3

I got a question about Custom Variables.

Our store uses them to have Print Specifications for different products. Is it possible to translate those Custom Variables?

I have tried putting:

<?php echo $this->__($myvalue); ?>   

But inline translation for this does not work.

What is working right now is the labels:

<h3><?php echo $this->__($this->htmlEscape('Print Specifications')) ?></h3>

Any ideas?

Thanks!

UPDATE:

here is how I get the Custom Variable:

<?php $myvalue = Mage::getModel('core/variable')->loadByCode($_helper->productAttribute($this->getProduct(), $_product->getPrintSpecifications(), "print_specifications"))->getValue('html'); ?>

1 Answer 1

1

Yes, you can translate custom variables, but similar to product attributes, this is not per language, but per store view.

When editing the variable, you can change the store view and override the default value:

screenshot

1
  • this is a correct solution, but since my management doesnt want to re-type everything, I ended up writing a custom plugin that does preg_replace on anything. Commented Aug 26, 2016 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.