Click or drag to resize

LocalizableItemAttributetag Field

Tag to use when resolving the string via the localizer.

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.2.3 (in KSPDev_Utils.2.3.dll) Version: 2.3 for KSP v1
Syntax
C#
public string tag
Request Example View Source

Field Value

Type: String
Remarks
It can be set to null to indicate that the attributed item doesn't need localization. Such attributes are NO-OP during the game, but for the localization tool it's a signal to not include the item into the localization config.
Examples
[KSPField(guiName = "just-in-case text", guiActive = true)]
[LocalizableItem(
    tag = "#tag1",
    defaultTemplate = "English text 1",
    description = "A field which demonstrates a localizable GUI string")]
public string field1 = "";

// This field doesn't have guiName and it would, normally, be treated as a non-GUI field. However,
// due to the localization attribute, the guiName value will be assigned when the module is
// loaded.
[KSPField(guiActive = true)]
[LocalizableItem(
    tag = "#tag2",
    defaultTemplate = "English text 2",
    description = "A field which demonstrates a localizable GUI string without guiName")]
public string field2 = "";
Examples
// This field won't be localized but translation tool will be aware of it.  
[KSPField(guiName = "just-in-case text", guiActive = true)]
[LocalizableItem(tag = null)]
public string field4 = "";
See Also