Przemek_kondor 14 Posted February 1, 2009 Hi I have some string variables created in stringtable.csv. Is there way to concat them and use in description.ext as titleParam1 or in textsParam1[] ? For example I have $STR_LOCATION (in english: "Location") and $STR_DAYTIME (in english "Day time") and I want to get: "Location | Day time" Share this post Link to post Share on other sites
dr_eyeball 16 Posted February 3, 2009 I have used __EVAL in classes for that, so it might work here. See BIKI You could try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">x_EVAL( $STR_LOCATION + $STR_DAYTIME ) LOL. This forum actually tries to parse the code, so the "x" is really another underscore, making it a double underscore prefix. Share this post Link to post Share on other sites
.kju 3245 Posted February 3, 2009 nice tip. thanks mate! Share this post Link to post Share on other sites
Przemek_kondor 14 Posted February 3, 2009 indeed Very thanks and  Share this post Link to post Share on other sites
Przemek_kondor 14 Posted February 6, 2009 very strange, these: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = EVAL ("string1" + " string2"); and <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = $STR_DAYTIME; and <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = $STR_LOCATION; work but this one: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = EVAL ($STR_LOCATION + $STR_DAYTIME); doesn't work (of course EVAL has two undercore prefix: __EV... but forum parses it) Share this post Link to post Share on other sites
General Barron 0 Posted February 6, 2009 I'd image that: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = _EVAL ($STR_LOCATION + $STR_DAYTIME); Turns into: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = "$STR_LOCATION$STR_DAYTIME"; After config processing. I'm guessing the $ gets evaluated after this step. Note, that there are always quotes added around $ strings anyway. So this line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = $STR_DAYTIME; Is really the same as this line: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = "$STR_DAYTIME"; My suggestion? Simply make a new string in your stringtable. Ex: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">titleParam1 = "$STR_DAYTIME_AND_LOCATION"; Share this post Link to post Share on other sites
kronzky 5 Posted February 6, 2009 You can use variables and most scripting commands in the description.ext. Together with _EXEC, it gives you pretty good flexibility: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_EXEC(_str=localize "STR_LOCATION" + " | " + localize "STR_DAYTIME"); text = _EVAL(_str); (Of course, use double-underscores before EXEC & EVAL in your real code.) Share this post Link to post Share on other sites