ServerLanguages

interface ServerLanguages

Manages languages.

Properties

Link copied to clipboard

Gets the default client language.

Link copied to clipboard
abstract var crowdinEnabled: Boolean

Gets or sets whether crowdin is enabled.

Link copied to clipboard

Gets the default server language.

Functions

Link copied to clipboard
abstract fun getClientLanguage(languageName: String?): Map<String, String>

Gets client language data by name or default language if not found.

open fun getClientLanguage(holder: McChatHolder): Map<String, String>

Gets client language data based on the chat holder's language setting.

Link copied to clipboard
abstract fun getServerLanguage(languageName: String?): Map<String, String>

Gets server language data by name or default language if not found.

open fun getServerLanguage(holder: McChatHolder): Map<String, String>

Gets server language data based on the chat holder's language setting.

Link copied to clipboard
abstract fun register(resourceLoader: ResourceLoader, languagesFolder: File): CompletableFuture<Void>

Registers a new language using resources.

abstract fun register(url: URL, fileName: String?, resourceLoader: ResourceLoader, languagesFolder: File): CompletableFuture<Void?>
open fun register(crowdinProjectId: String, fileName: String?, resourceLoader: ResourceLoader, languagesFolder: File): CompletableFuture<Void?>

Registers a new language using crowdin.

Link copied to clipboard
open fun translate(text: McTranslatableText, holder: McChatHolder, key: String): McTextComponent?

Translates text using the server language.