You should change the structure of the input XML and use e.g. <text xml:lang="en">Hello</text>
if you can, then you can write <xsl:value-of select="//text[lang($language)]"/>
.
If you can't change the structure of the input XML, use <xsl:value-of select="//*[local-name() = concat('text-', $language)]"/>
.