Click or drag to resize

LocalizableMessage Class

Base class for the messages that support localization.
Inheritance Hierarchy
SystemObject
  KSPDev.GUIUtilsLocalizableMessage
    More...

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.1.0 (in KSPDev_Utils.1.0.dll) Version: 1.0 for KSP v1.6+
Syntax
C#
public class LocalizableMessage
Request Example View Source

The LocalizableMessage type exposes the following members.

Constructors
  NameDescription
Protected methodLocalizableMessage
Constructs a localizable message.
Top
Properties
  NameDescription
Public propertylocalizedTemplate
Localized Lingoona Grammar template for the tag.
Top
Methods
  NameDescription
Public methodLoadLocalization
Instructs the implementation to load a localized template.
Top
Fields
  NameDescription
Public fielddefaultTemplate
Template to use if no localized template found.
Public fielddescription
Description for the message.
Public fieldexample
Example usage and the output.
Public fieldguiTags
GUI specific settings that suggest how to show the message.
Protected fieldloadedLocVersion
Currently cached version of the localization content.
Public fieldStatic membersystemLocVersion
Current version of the loaded localizations.
Public fieldtag
Tag to use when resolving the string via the Localizer.
Top
Remarks

This class is not intended for the use on its own. See the inheritance hierarchy for the classes that inherit it.

This class is performance optimized. Once a string is resolved to the localized content, it's cached and reused in the subsequent calls. The cache can be reset by incrementing the systemLocVersion.

The template of the messages supports special tags that may give a hint to the caller code on how the messages should be rendered. Those tags must be palced at the beginning of the template. For the available tags see LocalizableMessageGuiTags.

See Also
Inheritance Hierarchy
SystemObject
  KSPDev.GUIUtilsLocalizableMessage
    KSPDev.GUIUtilsMessage
    KSPDev.GUIUtilsMessageT1
    KSPDev.GUIUtilsMessageT1, T2
    KSPDev.GUIUtilsMessageT1, T2, T3
    KSPDev.GUIUtilsMessageT1, T2, T3, T4
    KSPDev.GUIUtilsMessageT1, T2, T3, T4, T5