LocalizationContext Class

Represents the context of a localization operation that provides information for the LocalizationRequested event, and can determine the source of the resources for dynamic automatic localization.

Definition

Namespace: KGySoft.WinForms
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
public sealed class LocalizationContext
Inheritance
Object    LocalizationContext

Remarks

Constructors

LocalizationContext Initializes a new instance of the LocalizationContext class.

Properties

LanguageHint Gets the culture of the suggested language for the localization operation. If it was not specified otherwise when creating this instance, it is initialized by the UI culture of the current thread, but it can be overridden by the handler of the LocalizationRequested event.
LocalizationScope Gets the scope of the localization operation. It is never Disabled here.
RootName Gets the name of the root control or object that is being localized. Can be an Assembly name if this LocalizationContext was created using the FromAssemblyScope method.
RootType Gets the type of the root control or object that is being localized. Can be if this LocalizationContext was created using the FromAssemblyScope method.
ToolTip Gets a ToolTip applicable for the root object, if any. When presents, the LocalizationHelper.LocalizeStringProperties method can apply {name}.ToolTipText resource keys for Control instances.

Methods

Equals Determines whether the specified object is equal to the current LocalizationContext instance.
(Overrides ObjectEquals(Object))
FromAssemblyScope Creates a LocalizationContext from the specified assembly.
FromLocalScope Creates a LocalizationContext from the specified type.
GetHashCode Returns a hash code for the current LocalizationContext instance.
(Overrides ObjectGetHashCode)
ToString Returns a string that represents the current LocalizationContext instance.
(Overrides ObjectToString)

See Also