Variable variables in Twig I'd like to create a variable from another variable. What I got right now is something like this:

{% set language = fr %} 
{% if language == "en"  %}
   {% set fooAddress = en_foobar.globalAddress %} 
{% if language == "fr"  %}
   {% set fooAddress = fr_foobar.globalAddress %}
{% if language == "de"  %}
   {% set fooAddress = de_foobar.globalAddress %} 


What I'd like to do is:

{% set fooAddress = language  ~ "_foobar.globalAddress" %}


No problem with plain PHP (http://php.net/manual/en/language.variables.variable.php) but is this possible to do with Twig?
In order to pull this off, you'll need to take advantage of the not very well  documented _context variable in Twig.  This should do it:

{% set language = 'fr' %}

{% set foobar = _context[language ~ "_foobar"] is defined ? _context[language ~ "_foobar"] : null %}

{% if foobar %}
    {{ foobar.globalAddress }}
{% endif %}