2019-03-30 23:04:15 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2019-04-14 11:55:05 -04:00
|
|
|
|
namespace SharedLibraryCore.Configuration.Attributes
|
2019-03-30 23:04:15 -04:00
|
|
|
|
{
|
2019-04-14 11:55:05 -04:00
|
|
|
|
class LocalizedDisplayName : DisplayNameAttribute
|
2019-03-30 23:04:15 -04:00
|
|
|
|
{
|
|
|
|
|
private readonly string _localizationKey;
|
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];
|
|
|
|
|
}
|
|
|
|
|
}
|