dear,
I have a select input and Language enum, how can I use abp resource on DisplayAttribute?
《select asp-items="@Html.GetEnumSelectList(typeof(Language))"></select 》
public enum Language
{
[Display(Name="localized string here")]
Javascript,
CSharp
}
ABP framework does not have a ready-made way to achieve it.
You can define the Key of the language.
Example:
```c#
public enum Language
{
[Display(Name="Language.Javascript")]
Javascript,
[Display(Name="Language.CSharp")]
CSharp
}
```
Then use ABP to localize the language when taking enumeration value strings.
GetEnumSelectList doesn't seem to support too many customizations, maybe you need to implement it yourself.
Most helpful comment
ABP framework does not have a ready-made way to achieve it.
You can define the Key of the language.
Example:
```c#
public enum Language
{
[Display(Name="Language.Javascript")]
Javascript,
}
```
Then use ABP to localize the language when taking enumeration value strings.
GetEnumSelectList doesn't seem to support too many customizations, maybe you need to implement it yourself.