Class RegisterLocalizationResourceAttribute
- Namespace
- CMS.Localization
- Assembly
- CMS.Globalization.dll
Class represents an attribute used for registering localization resources.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public class RegisterLocalizationResourceAttribute : Attribute, IPreInitAttribute
- Inheritance
-
objectAttributeRegisterLocalizationResourceAttribute
- Implements
- Derived
- Extension Methods
Constructors
RegisterLocalizationResourceAttribute(Type, LocalizationTarget, params string[])
Initializes a new instance of a RegisterLocalizationResourceAttribute
public RegisterLocalizationResourceAttribute(Type markedType, LocalizationTarget target, params string[] cultureCodes)
Parameters
markedTypeTypetargetLocalizationTargetcultureCodesstring[]
RegisterLocalizationResourceAttribute(Type, params string[])
Initializes a new instance of a RegisterLocalizationResourceAttribute
public RegisterLocalizationResourceAttribute(Type markedType, params string[] cultureCodes)
Parameters
markedTypeTypecultureCodesstring[]
Properties
CultureCodes
Array of culture codes that use for which the MarkedType is being used by localization.
public string[] CultureCodes { get; }
Property Value
- string[]
Data
Defines custom data which describe the way the registered resource is to be used. Used for modularization and customization scenarios.
[Obsolete("Use the Target parameter of constructor to define where this localization resource will be used.")]
protected object Data { get; set; }
Property Value
- object
Remarks
Used to determine whether resource strings are supplied to the client-side application
by checking for the not null reference of this property.
MarkedType
Defines type wrapping the '.resx' file used for localization and serves as a access point to the file.
public Type MarkedType { get; }
Property Value
- Type
Methods
PreInit()
Used for initializing the attribute.
public void PreInit()