You can use a code like:
string output = ResHelper.RegExLocalize.Replace(input, LocalizedStringMatch);
where input is a string with localization macros.
Then you need to specify LocalizedStringMatch, for example:
/// <summary>
/// Match evaluator for the string localization
/// </summary>
/// <param name="m">Regular expression match</param>
private static string LocalizedStringMatch(System.Text.RegularExpressions.Match m)
{
string expression = m.Groups[1].ToString();
return ResHelper.GetString(expression, culture);
}
where culture is a global string variable which contains a culture code (i.e. “en-US”).
-hg-