Smartsite Resources Classes

Release 1.0 - ...

The common library Smartsite.Tools exposes several custom resource classes which are derived from and serve as a replacement for the framework resource classes. The common namespace for these custom resource classes is

Smartsite.Tools.Internationalization.Resources

The following custom classes are available:

  • SmartsiteResourceSet
    Derived from System.Resources.ResourceSet

    A ResourceSet stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules. A SmartsiteResourceSet internally encapsulates two separate system ResourceSets. One ResourceSet represents the compiled resources embedded into the application at compile time. A second ResourceSet represents custom resources that override and extend the embedded resources. SmartsiteResourceSet expects a custom resource xml file to be located in the same folder as the (satellite) assembly containing the compiled resources. The custom resource file should be named according to the following standard: [AssemblyName].[ResourceName].[CultureName].xml

    When retrieving the resource value for a certain resource identifier, a SmartsiteResourceSet first tries to return an associated resource value from the custom resource set. If a custom resource file does not exist, or if the file does not contain a custom resource value for the given resource identifier, then SmartsiteResourceSet falls back to the embedded application resource file.


  • SmartsiteResourceEnumerator
    Implements IDictionaryEnumerator and IEnumerator

    Custom enumerator, enumerates all the available custom resources, and also any embedded resources that have not been overriden by an associated custom resource.


  • SmartsiteResourceManager
    Derived from System.Resources.ResourceManager

    SmartsiteResourceManager manages the resource sets for all of the available cultures. Creates a SmartsiteResourceSet instance for an embedded resource with an associated custom resource file, or a standard ResourceSet instance if no custom resource file exists. Returns customized resource values when available, and embedded resources otherwise.


  • SmartsiteComponentResourceManager
    Derived from System.Resources.ComponentResourceManager

    ComponentResourceManager is a specialized resource manager for use with Windows Forms that associates localizable control properties with values in the associated form resource file. SmartsiteComponentResourceManager is a derived class that creates SmartsiteResourceSet instances, like the regular SmartsiteResourceManager.


  • ChangeFormCulture

    Utility class exposing static helper methods to change the culture of a Windows Form at runtime, by reinitializing all the localizable form control properties from the resource file for the desired culture.