Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

How to use UserControlBase.Translate with same element


Normally, when you need to retrieve values from relatePlusEN.xml, you use Translate

string value = Translate("/login/currentuser");


But what if I have this entry:

<country name="UnitedStates">
<text>United States</text>
<country name="NewZealand">
<text>New Zealand</text>
<country name="Australia">

How can I get the text value for the UnitedStates country?

I tried Translate("/countryselector/country name=\"UnitedStates\"/text"); but it didn't work. It just returned missing value.

Sep 28, 2011 3:53


Try Translate("/countryselector/country[@name=\"UnitedStates\"]/text");


Per Gunsarfs

EPiServer Development Team

Sep 28, 2011 8:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.