Search Results for

    Show / Hide Table of Contents

    Class TranslationManager

    Used to handle plugin translations.

    Inheritance
    System.Object
    TranslationManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.Loader
    Assembly: Exiled.Loader.dll
    Syntax
    public static class TranslationManager

    Methods

    | Improve this Doc View Source

    Clear()

    Clears the translations.

    Declaration
    public static bool Clear()
    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether translations have been cleared successfully or not.

    | Improve this Doc View Source

    Load(String)

    Loads all of the plugin's translations.

    Declaration
    public static SortedDictionary<string, ITranslation> Load(string rawTranslations)
    Parameters
    Type Name Description
    System.String rawTranslations

    The raw translations to be loaded.

    Returns
    Type Description
    System.Collections.Generic.SortedDictionary<System.String, ITranslation>

    Returns a dictionary of loaded translations.

    | Improve this Doc View Source

    LoadTranslation(IPlugin<IConfig>, Dictionary<String, Object>)

    Loads the translations of a plugin based on the actual distribution.

    Declaration
    public static ITranslation LoadTranslation(this IPlugin<IConfig> plugin, Dictionary<string, object> rawTranslations = null)
    Parameters
    Type Name Description
    IPlugin<IConfig> plugin

    The plugin which its translation has to be loaded.

    System.Collections.Generic.Dictionary<System.String, System.Object> rawTranslations

    The raw translations to check whether or not the plugin already has a translation config.

    Returns
    Type Description
    ITranslation

    The ITranslation of the desired plugin.

    | Improve this Doc View Source

    Read()

    Read all plugin translations.

    Declaration
    public static string Read()
    Returns
    Type Description
    System.String

    Returns the read translations.

    | Improve this Doc View Source

    Reload()

    Reads, loads, and saves plugin translations.

    Declaration
    public static bool Reload()
    Returns
    Type Description
    System.Boolean

    Returns a value indicating if the reloading process has been completed successfully or not.

    | Improve this Doc View Source

    Save(SortedDictionary<String, ITranslation>)

    Saves plugin translations.

    Declaration
    public static bool Save(SortedDictionary<string, ITranslation> translations)
    Parameters
    Type Name Description
    System.Collections.Generic.SortedDictionary<System.String, ITranslation> translations

    The translations to be saved.

    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether the translations have been saved successfully or not.

    | Improve this Doc View Source

    SaveDefaultTranslation(String)

    Saves default distribution translations.

    Declaration
    public static bool SaveDefaultTranslation(string translations)
    Parameters
    Type Name Description
    System.String translations

    The translations to be saved, already serialized in yaml format.

    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether the translations have been saved successfully or not.

    | Improve this Doc View Source

    SaveSeparatedTranslation(String, String)

    Saves plugin translations based on the separated distribution.

    Declaration
    public static bool SaveSeparatedTranslation(this string pluginPrefix, string translations)
    Parameters
    Type Name Description
    System.String pluginPrefix

    The prefix of the plugin which its translation is going to be saved.

    System.String translations

    The translations to be saved, already serialized in yaml format.

    Returns
    Type Description
    System.Boolean

    Returns a value indicating whether the translations have been saved successfully or not.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX