DynamicStringLocalization Enumeration

Represents the possible modes of dynamic string localization for forms and user controls derived from BaseForm and BaseUserControl.

See the online help of the BaseForm.DynamicStringLocalization property for an example.

Definition

Namespace: KGySoft.WinForms
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
public enum DynamicStringLocalization

Examples

Members

Disabled0 Specifies no automatic string localization for the controls of the current BaseForm or BaseUserControl. If DynamicStringLocalization is disabled for a BaseUserControl, a parent BaseUserControl or BaseForm can still apply an automatic localization, if it has a non-disabled DynamicStringLocalization mode.
LocalScope1 Specifies that the BaseForm or BaseUserControl will automatically apply string resources to its controls when the control is loaded, or when LanguageSettings.DisplayLanguage is set to a different language than the current one. The localization occurs for localizable string properties of the controls if their ControlName.PropertyName entry exists in the invariant resource file. The name of the resource should follow the pattern MyNamespace.MyFormOrUserControl.StringResources. The resource can be either compiled to the project or placed in the Resources folder of the build output directory as a .resx file. This option allows generating new resource files in .resx format when requesting localization for a language that has no resources yet.
See the Remarks section of the DynamicStringLocalization property for more details.
AssemblyScope2 Similar to LocalScope, except that a single resource file is used for all forms and user controls in the same assembly, using the pattern MyAssemblyName.StringResources. If you use this option, you must ensure that controls with potentially different texts have distinct names.
Custom3 Specifies that though the BaseForm or BaseUserControl traverses its controls when it is loaded, it does not apply any localization automatically. You need to handle the LocalizationRequested event to provide a localization for the enumerated properties of the controls.
See the Remarks section of the DynamicStringLocalization property for more details.

See Also