Search Results for

    Show / Hide Table of Contents

    Class FileTranslationSource

    Base class for translation sources that are backed by a file. This class reads the translations from the backing file and registers them with LocalizationService.

    Inheritance
    Object
    BaseTranslationSource
    FileTranslationSource
    CSVTranslationSource
    JsonTranslationSource
    Implements
    ITranslationSource
    ILocalizationServiceComponent
    IServiceComponent<LocalizationService>
    Inherited Members
    BaseTranslationSource._translations
    BaseTranslationSource.translations
    BaseTranslationSource.LoadTranslationEntries(List<TranslationEntry>)
    BaseTranslationSource._readyToConnect
    BaseTranslationSource._connected
    BaseTranslationSource.Init()
    BaseTranslationSource.mono
    BaseTranslationSource.IsConnected<ST>()
    BaseTranslationSource.Connect<ST>()
    BaseTranslationSource.Disconnect<ST>()
    BaseTranslationSource.Awake()
    BaseTranslationSource.OnEnable()
    BaseTranslationSource.OnDisable()
    BaseTranslationSource.GetTranslation(String, String)
    BaseTranslationSource.Clear()
    Namespace: NoSuchStudio.Localization
    Assembly: NoSuchStudio-Localization.dll
    Syntax
    [ExecuteInEditMode]
    public abstract class FileTranslationSource : BaseTranslationSource, ITranslationSource, ILocalizationServiceComponent, IServiceComponent<LocalizationService>

    Fields

    _error

    Declaration
    protected string _error
    Field Value
    Type Description
    String

    _textAsset

    The backing text asset.

    Declaration
    [SerializeField]
    protected TextAsset _textAsset
    Field Value
    Type Description
    UnityEngine.TextAsset

    Properties

    error

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

    textAsset

    Declaration
    public TextAsset textAsset { get; set; }
    Property Value
    Type Description
    UnityEngine.TextAsset

    Methods

    OnValidate()

    Declaration
    public virtual void OnValidate()

    ReadTranslationsFromFile()

    Subclasses should implement this method to read the file contents and populate the _translations field.

    Declaration
    protected abstract List<TranslationEntry> ReadTranslationsFromFile()
    Returns
    Type Description
    List<TranslationEntry>

    Reload()

    Declaration
    public void Reload()

    Reset()

    Declaration
    protected override void Reset()
    Overrides
    BaseTranslationSource.Reset()

    Start()

    Declaration
    protected virtual void Start()

    Implements

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