Skip to content

Allow text Localization #478

Description

@fborto

Excel Type

  • XLSX
  • XLSM
  • CSV
  • OTHER

Please add column name localization; actually I overrided the DisplayNameAttribute class:

    public sealed class ExcelColumnNameLocalize : DisplayNameAttribute
    {
        private ResourceManager? _resourceManager;
        private Type? _resourceType;

        public ExcelColumnNameLocalize(string displayName)
            : base(displayName)
        {
        }

        public Type? ResourceType
        {
            get => _resourceType;
            set
            {
                if (_resourceType != value)
                {
                    _resourceType = value;
                    if (value is not null)
                    {
                        _resourceManager = new ResourceManager(value);
                    }
                }
            }
        }

        public override string DisplayName => _resourceManager?.GetString(DisplayNameValue) ?? DisplayNameValue;

    }

but I prefer an integrated solution.

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions