Class wwDbResourceControl

The wwDbResourceControl class provides Page level Resource Administration support to localizable ASP.NET pages. This control allows bringing up the localization Administration Form that shows all localizable resources for editing and translation.

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 wwDbResourceConfiguration object (and the wwDbResourceConfigurationSection 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.

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      System.Web.UI.WebControls.CompositeControl
        Westwind.Globalization.wwDbResourceControl

public class wwDbResourceControl : Panel

Class Members

MemberDescription
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 );
OnEditResources Event handler that is called and can be hooked when the Edit Resources option is clicked. This interface brings up the Administration form.
public virtual void OnEditResources( object sender,
EventArgs e );
OnShowIcons Event handler that is called when the Show Icons checkbox is checked or unchecked. The default behavior sets the current wwDbResourceConfiguration.ShowControlIcons setting which is global.
public virtual void OnShowIcons( object sender,
EventArgs e );
DesignMode

Requirements

Namespace: Westwind.Globalization
Assembly: westwind.globalization.dll


  Last Updated: 7/31/2007 | © West Wind Technologies, 2008