public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if ((value != null) && (parameter != null)) { // Get the format resource string formatStringKey = parameter.ToString(); string formatString = StringResourcesManager.GetResource(formatStringKey); // format the value into the resource string return string.Format(formatString, value); } else return null; }
public LocalizedCategoryAttribute(string category) : base(category) { Category = StringResourcesManager.GetResource(category); }
public LocalizedDisplayNameAttribute(string displayName) : base(displayName) { Name = StringResourcesManager.GetResource(displayName); }
public LocalizedPropertyDescriptionAttribute(string desc) : base(desc) { _description = StringResourcesManager.GetResource(desc); }