我有这个enum
国家:
public enum Country
{
[Display(Description ="Netherlands", ResourceType = typeof(MyResource))]
Netherlands = 0,
[Display(Description = "Germany", ResourceType = typeof(MyResource))]
Germany = 1,
[Display(Description = "Belgium", ResourceType = typeof(MyResource))]
Belgium = 2,
[Display(Description = "Luxembourg", ResourceType = typeof(MyResource))]
Luxembourg = 3,
[Display(Description = "France", ResourceType = typeof(MyResource))]
France = 4,
[Display(Description = "Spain", ResourceType = typeof(MyResource))]
Spain = 5
}
这是在 a 中显示枚举的扩展方法MultiSelectList
:
public static MvcHtmlString MultiSelectBoxFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<SelectListItem> selectList)
{
return htmlHelper.ListBoxFor(expression, selectList, new { @class = "chzn-select", data_placeholder = Form.MultiSelect });
}
这MultiSelectList
具有“选择”的风格。看到这个网站了解更多信息
当我不需要它来支持更多语言等时,这一切都很好。
我怎样才能使这项工作与本地化?