Hello,
I made a custom DisplayNameAttribute class, it will retreive the displayname from txlib resource based on the used culture.
public sealed class DisplayNameByResourceAttribute : DisplayNameAttribute
{
public DisplayNameByResourceAttribute(string resourceKey) : base(GetResourceValue(resourceKey))
{
ResourceKey = resourceKey;
}
public string ResourceKey { get; }
private static string GetResourceValue(string key)
{
return Tx.Text(key);
}
}
I want the DisplayName is updated at runtime when the txlib culture changes. Any help with this?