Class PhrasedWithVariablesComponentLocalizer<LT, CT>
The base class for localized components that have a phrase and also use variable substitution. Override UpdateVariabledComponent() when inheriting from this class. _text field is the _translation with its variables replaced. Use it when updating the component.
Inheritance
ComponentLocalizer<LT, CT>
PhrasedComponentLocalizer<LT, CT>
PhrasedWithVariablesComponentLocalizer<LT, CT>
Inherited Members
Namespace: NoSuchStudio.Localization
Assembly: NoSuchStudio-Localization.dll
Syntax
public abstract class PhrasedWithVariablesComponentLocalizer<LT, CT> : PhrasedComponentLocalizer<LT, CT>, ILocalizationServiceComponent, IServiceComponent<LocalizationService>, IVariablesServiceComponent where LT : PhrasedWithVariablesComponentLocalizer<LT, CT> where CT : Component
Type Parameters
| Name | Description |
|---|---|
| LT | The class that inherits PhrasedWithVariablesComponentLocalizer. |
| CT | The component that is localized by LT. |
Fields
_text
Declaration
[NonSerialized]
protected string _text
Field Value
| Type | Description |
|---|---|
| String |
_variables
Declaration
[NonSerialized]
protected List<string> _variables
Field Value
| Type | Description |
|---|---|
| List<String> |
Methods
Init()
Declaration
protected override void Init()
Overrides
NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.Init()
OnDisable()
Declaration
protected override void OnDisable()
Overrides
NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.OnDisable()
OnEnable()
Declaration
protected override void OnEnable()
Overrides
NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.OnEnable()
OnValidate()
Declaration
protected override void OnValidate()
Overrides
NoSuchStudio.Localization.PhrasedComponentLocalizer<LT, CT>.OnValidate()
Reconnect<ST>()
Declaration
public override void Reconnect<ST>()
where ST : Service<ST>
Type Parameters
| Name | Description |
|---|---|
| ST |
Overrides
NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.Reconnect<ST>()
UpdatePhrasedComponent()
Declaration
public override sealed void UpdatePhrasedComponent()
Overrides
NoSuchStudio.Localization.PhrasedComponentLocalizer<LT, CT>.UpdatePhrasedComponent()
UpdateVariabledComponent()
Declaration
public abstract void UpdateVariabledComponent()
Implements
IServiceComponent<>
IVariablesServiceComponent