# String var defined by another string var?

**URL:** <https://forum.kirupa.com/t/string-var-defined-by-another-string-var/275070>\
**Category:** Uncategorized\
**Created:** [November 8, 2008, 9:44pm UTC](https://forum.kirupa.com/t/string-var-defined-by-another-string-var/275070 "2008-11-08T21:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhnh](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@bhnh](https://forum.kirupa.com/u/bhnh)\
**Post date:** [November 8, 2008, 9:44pm UTC](https://forum.kirupa.com/t/string-var-defined-by-another-string-var/275070/1 "2008-11-08T21:44:46Z")

</div>

Let’s take the following…

```auto

[LEFT]var motto_en:[COLOR=#0000ff]String[/COLOR] = [COLOR=#ff0000]"God and my right"[/COLOR];
var motto_fr:[COLOR=#0000ff]String[/COLOR] = [COLOR=#ff0000]"Dieu et mon droit"[/COLOR];
trace[COLOR=#000000]([/COLOR]motto_fr[COLOR=#000000]);[/COLOR][/LEFT]

```

This returns **[COLOR=green]Dieu et mon droit[/COLOR]**. Cool. But if I try this…

```auto

[LEFT]var motto_en:[COLOR=#0000ff]String[/COLOR] = [COLOR=#ff0000]"God and my right"[/COLOR];
var motto_fr:[COLOR=#0000ff]String[/COLOR] = [COLOR=#ff0000]"Dieu et mon droit"[/COLOR];
var lang:[COLOR=#0000ff]String[/COLOR] = [COLOR=#ff0000]"fr"[/COLOR];
trace[COLOR=#000000]([/COLOR][COLOR=#ff0000]"motto_"[/COLOR]+lang[COLOR=#000000])[/COLOR];[/LEFT]

```

… what I get back is **[COLOR=red]motto\_fr[/COLOR]**, which is not cool, because I want to get back **[COLOR=green]Dieu et mon droit[/COLOR]**. Basically I’m looking for a setup like the second example that returns the _value_ of [COLOR=blue]\*\*“motto”+lang \*\*[/COLOR]rather than the string.

HELLLLP!, please. :eek: Thanks!
