|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
dazmango Smarty n00b
Joined: 17 Apr 2011 Posts: 1
|
Posted: Sun Apr 17, 2011 6:12 pm Post subject: Variable as variable extension ie. $LANG.$variable |
|
|
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 |
|
|
|
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
|