VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: encreplus on December 15, 2012, 00:12:39 AM

Title: Language string in product description ... possible ?
Post by: encreplus on December 15, 2012, 00:12:39 AM
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
Title: Re: Language string in product description ... possible ?
Post by: 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
Title: Re: Language string in product description ... possible ?
Post by: encreplus on December 15, 2012, 18:55:58 PM
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 ...
Title: Re: Language string in product description ... possible ?
Post by: PRO on December 15, 2012, 19:33:43 PM
you have to enable php tags in the editor parameters


Title: Re: Language string in product description ... possible ?
Post by: bytelord on December 15, 2012, 21:27:36 PM
alternative you could use:

(my choice)
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/4470

or

http://www.nonumber.nl/extensions/sourcerer
Title: Re: Language string in product description ... possible ?
Post by: encreplus on December 15, 2012, 22:18:40 PM
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') ?> ...
Title: Re: Language string in product description ... possible ?
Post by: encreplus on December 19, 2012, 01:25:45 AM
Quote from: PRO on December 15, 2012, 19:33:43 PM
you have to enable php tags in the editor parameters




No change ... not working
Title: Re: Language string in product description ... possible ?
Post by: bytelord on December 19, 2012, 19:11:23 PM
Hello,

Give a try on this
Quote from: bytelord on December 15, 2012, 21:27:36 PM
alternative you could use:

(my choice)
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/4470

or

http://www.nonumber.nl/extensions/sourcerer