You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a localized website and I need the breadcrumbs to be localizable too.
Usually when I write a localizable attribute I create a constructor with the type of Resources and a string that would be the key to search for. This is the same concept used, for example, by the DisplayAttribute in the COmponentModel namespace.
public class BreadcrumbAttribute(string titleKey, Type resourceType)
I tried to replicate the same operation by deriving a class from the BreadcrumbAttribute attribute but since the proprties are not virtual it is not possible for me to change the behavior in the correct way.
Suggestion
Make all properties in the BreadcrumbAttribute as virtual OR
Implements the localization pattern directly inside the library
The text was updated successfully, but these errors were encountered:
I am developing a localized website and I need the breadcrumbs to be localizable too.
Usually when I write a localizable attribute I create a constructor with the type of Resources and a string that would be the key to search for. This is the same concept used, for example, by the
DisplayAttribute
in the COmponentModel namespace.public class BreadcrumbAttribute(string titleKey, Type resourceType)
I tried to replicate the same operation by deriving a class from the
BreadcrumbAttribute
attribute but since the proprties are not virtual it is not possible for me to change the behavior in the correct way.Suggestion
Make all properties in the
BreadcrumbAttribute
asvirtual
OR
Implements the localization pattern directly inside the library
The text was updated successfully, but these errors were encountered: