News:

Looking for documentation? Take a look on our wiki

Main Menu

Language string in product description ... possible ?

Started by encreplus, December 15, 2012, 00:12:39 AM

Previous topic - Next topic

encreplus

Good day,

i would like to include a tag like COM_VIRTUEMART_DESC_PAGES in the product description ... i have tried it but dont work ... it shows the tag not the result ...

The reason that i need to do this it is to save me a lot of times for my translation ...

Can i achieve this ?

VM 2.0.14

bytelord

#1
Hello,

You mean the translation key i suppose, use JText:

echo JText::_('COM_VIRTUEMART_DESC_PAGES');

You could place it after product description inside your overridden template, not inside the editor.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

encreplus

Quote from: bytelord on December 15, 2012, 01:44:59 AM
Hello,

You mean the translation key i suppose, use JText:

echo JText::_('COM_VIRTUEMART_DESC_PAGES');

You could place it after product description inside your overridden template, not inside the editor.

Regards

Yes i mean the jtext ... but i need it in the DESCRIPTION inside the editor ...

PRO

you have to enable php tags in the editor parameters



bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

encreplus

Quote from: PRO on December 15, 2012, 19:33:43 PM
you have to enable php tags in the editor parameters




Did that but the result on the page is BLANK ... if i look at the source code i see this ... <?php echo JText::_ ('COM_VIRTUEMART_ALSO_IN_CATEGORY') ?> ...

encreplus


bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!