Server that manages all translations.
    public static class TranslationServer

Server that manages all translations. Translations can be set to it and removed from it.

Inheritance Chain

Static Properties

    public static Object Singleton { get; }

Static Methods

    public static void AddTranslation(Translation translation)

Adds a Translation resource.

    public static void Clear()

Clears the server from all translations.

    public static string GetLocale()

Returns the current locale of the game.

    public static string GetLocaleName(string locale)

Returns a locale’s language and its variant (e.g. “en_US” would return “English (United States)”).

    public static void RemoveTranslation(Translation translation)

Removes the given translation from the server.

    public static void SetLocale(string locale)

Sets the locale of the game.

    public static string Translate(string message)

Returns the current locale’s translation for the given message (key).

Tags: