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