You must follow these steps:
(1) prepare resource files, for example. resource.en-US.resx / resource.zh-CN.resx / etc .. Each resource file has keys and values, their keys are the same between files, the values ββare different in languages.
(2) define your own DescriptionAttribute , something like this:
public class LocalDescriptionAttribute : DescriptionAttribute { public string ResourceKey { get; set; } public string CultureCode { get; set; }
Using:
public enum MyTexts { [LocalDescription(CultureCode="zh-CN", ResourceKey="Title")] Title = 0, [LocalDescription(ResourceKey="Status")]
source share