Skip to main content
Tweeted twitter.com/StackMagento/status/768250361081659392
edited tags; edited title
Link
Rakesh Jesadiya
  • 42.4k
  • 19
  • 132
  • 184

Magento 1 - Can Custom Variables be translated?

added 253 characters in body
Source Link

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'); ?>

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!

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'); ?>
Source Link

Magento - Can Custom Variables be translated?

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!