The control also provides the ability to show icons next to each control to jump directly to the appropriate control in the Admin form. The control can automatically detect Page, Control, Master Page (any template control) resources and jump directly to the appropriate resource entry if it exists.
Note the control shows all Localizable controls, but there's no guarantee that the controls are actually hooked up for localization in the ASP.NET page, control, master etc. resource. You need to ensure either implicit or explicit resources are actually configured on the pages.
For the control to work it merely should be placed on any form that is localizable. Display of the control is globally controlled via the DbResourceConfiguration object (and the DbResourceConfigurationSection in Web.config by default) which allows toggling display of the control in the UI and toggling the display of the individual resource icons.
The Administration form relies on the availability of the Administration form (LocalizeForm.aspx) and a configuration entry that points at this control. This form must be distributed with your Web application.
public class DbResourceControl : CompositeControl
Member | Description | |
---|---|---|
Constructor | The default control constructor. | |
AddLocalizationIcons | This method is responsible for showing localization icons next to every control that has localizable properties. public void AddLocalizationIcons(Control control,
bool TopLevel); |
|
AddResourceToResourceFile | Generates the Database resources for a given form public void AddResourceToResourceFile(Control ParentControl,
string ResourcePrefix, string ResourceSet); |
|
GetAllLocalizableControls | Goes through the form and returns a list of all control on a form that are marked as [Localizable] public List<LocalizableProperty> GetAllLocalizableControls(Control ContainerControl);
|
|
GetResourcesForId | public Dictionary<String,String> GetResourcesForId(string resourceID,
string resourceSet); |
|
ClientOnLocalizationIconHandler | Optional override for Client OnLocalization Handler that when set is fired in response to a click on one of the localization icons. Gets passed an event object plus the resource name and resource set name. | |
ShowIconsInitially | Determines the initial state of the ShowLocalization Icons Text box. |