namespace: Serenity.Localization assembly: Serenity.Net.Core
Adds local text translations defined implicitly by Description attributes in enumeration classes. Only enum values that has Description attribute are added as local text. By default, enums are registered in format: "Enums.{EnumerationTypeFullName}.{EnumValueName}". EnumerationTypeFullName, is fullname of the enumeration type. This can be overridden by attaching a EnumKey attribute.
public static void AddEnumTexts(this ILocalTextRegistry registry, ITypeSource typeSource,
string languageID = "")
parameter | description |
---|---|
typeSource | Type source to search for enumeration classes in |
languageID | Language ID texts will be added (default is invariant language) |
registry | Registry |
- interface ILocalTextRegistry
- interface ITypeSource
- class EnumLocalTextRegistration