IW4M-Admin/SharedLibraryCore/Configuration/Attributes/LocalizedDisplayName.cs

16 lines
457 B
C#
Raw Normal View History

2022-01-26 11:32:16 -05:00
using System.ComponentModel;
namespace SharedLibraryCore.Configuration.Attributes
{
2022-01-26 11:32:16 -05:00
internal class LocalizedDisplayName : DisplayNameAttribute
{
private readonly string _localizationKey;
2022-01-26 11:32:16 -05:00
public LocalizedDisplayName(string localizationKey)
{
_localizationKey = localizationKey;
}
public override string DisplayName => Utilities.CurrentLocalization.LocalizationIndex[_localizationKey];
}
2022-01-26 11:32:16 -05:00
}