Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Variable as variable extension ie. $LANG.$variable

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
dazmango
Smarty n00b


Joined: 17 Apr 2011
Posts: 1

PostPosted: Sun Apr 17, 2011 6:12 pm    Post subject: Variable as variable extension ie. $LANG.$variable Reply with quote

Hi,

Hello everybody.

Heck, I don't even know how to phrase my question but I'll give it a go & if someone educates me, that'll be great.

I am working with smarty in whmcs.
As an example, the following variables are used to help with changing language:

eg)
{$LANG.mainheader}

I would like to know if is possible to make the following work somehow:
{$LANG.$somevariable}

An example of when I might use this could be in some smarty loop:

{$product.type}

Which for the purpose of this example could print as:

widescreenmonitor

Whereas I would like to do:
{$LANG.$product.type}

Then in my language file I could have
$_LANG['widescreenmonitor'] = "A widescreen monitor"

I hope my question is clear.

Many thanks,
Dazmango
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP