Search Results for

    Show / Hide Table of Contents

    Class PhrasedComponentLocalizer<LT, CT>

    Base class for component localizers that depend on a phrase. UI texts are a good example. Override UpdatePhrasedComponent() instead of UpdateComponent() when inheriting this class. phrase property indicates the phrase to translate. _translation field is the translated phrase in current language. Use it when updating the component.

    Inheritance
    Object
    ComponentLocalizer<LT, CT>
    PhrasedComponentLocalizer<LT, CT>
    PhrasedWithVariablesComponentLocalizer<LT, CT>
    Implements
    ILocalizationServiceComponent
    IServiceComponent<LocalizationService>
    Inherited Members
    ComponentLocalizer<LT, CT>._component
    ComponentLocalizer<LT, CT>._readyToConnect
    ComponentLocalizer<LT, CT>.OnValidate()
    ComponentLocalizer<LT, CT>.Init()
    ComponentLocalizer<LT, CT>.Awake()
    ComponentLocalizer<LT, CT>.UpdateComponent()
    ComponentLocalizer<LT, CT>.mono
    ComponentLocalizer<LT, CT>._connected
    ComponentLocalizer<LT, CT>.IsConnected<ST>()
    ComponentLocalizer<LT, CT>.Reconnect<ST>()
    ComponentLocalizer<LT, CT>.OnLocaleChange(Locale)
    ComponentLocalizer<LT, CT>.RegisterToLocalization()
    ComponentLocalizer<LT, CT>.UnregisterFromLocalization()
    ComponentLocalizer<LT, CT>.OnEnable()
    ComponentLocalizer<LT, CT>.OnDisable()
    Namespace: NoSuchStudio.Localization
    Assembly: NoSuchStudio-Localization.dll
    Syntax
    public abstract class PhrasedComponentLocalizer<LT, CT> : ComponentLocalizer<LT, CT>, ILocalizationServiceComponent, IServiceComponent<LocalizationService> where LT : PhrasedComponentLocalizer<LT, CT> where CT : Component
    Type Parameters
    Name Description
    LT

    The component that inherits ComponentLocalizer.

    CT

    The component that is localized by LT.

    Remarks

    For example, a LT component that localizes a text would have LT = LT and CT = Text.

    Fields

    _phrase

    The phrase for this localized component.

    Declaration
    [SerializeField]
    protected string _phrase
    Field Value
    Type Description
    String

    _translation

    Declaration
    [NonSerialized]
    protected string _translation
    Field Value
    Type Description
    String

    Properties

    phrase

    Declaration
    public string phrase { get; set; }
    Property Value
    Type Description
    String

    Methods

    OnTranslationChange(String, Locale, String)

    Declaration
    protected virtual void OnTranslationChange(string phrase, Locale locale, string translation)
    Parameters
    Type Name Description
    String phrase
    Locale locale
    String translation

    OnValidate()

    Declaration
    protected override void OnValidate()
    Overrides
    NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.OnValidate()

    RegisterToLocalization()

    Declaration
    protected override void RegisterToLocalization()
    Overrides
    NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.RegisterToLocalization()

    UnregisterFromLocalization()

    Declaration
    protected override void UnregisterFromLocalization()
    Overrides
    NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.UnregisterFromLocalization()

    UpdateComponent()

    Declaration
    public override sealed void UpdateComponent()
    Overrides
    NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.UpdateComponent()

    UpdatePhrasedComponent()

    Declaration
    public abstract void UpdatePhrasedComponent()

    Implements

    ILocalizationServiceComponent
    IServiceComponent<>
    In This Article
    Back to top Generated by DocFX