public string GetString([NotNull] string resourceId) { string resourceString; lock (_cache) { if (!_cache.TryGetValue(resourceId, out resourceString)) { resourceString = Environments.GetLocalizedName(resourceId); _cache[resourceId] = resourceString; } } return(resourceString); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var valueText = value as string; if (string.IsNullOrEmpty(valueText)) { return(""); } if (valueText.StartsWith('@')) { return(Environments.GetLocalizedName(valueText)); } return(""); }