Translation

import org.UniversalDevelopment.universalChat.UniversalPluginFramework.PluginKit.UniversalApi.makeTranslation

Translate message to specific language

Note: Use country codes for the Language argument

UniversalApi.makeTranslation(Text, Language)
Text: String
Language: String

Returns String

Example

makeTranslation("Hello!", "de")

This example would change the string "Hello!" to German (de)

import org.UniversalDevelopment.universalChat.UniversalPluginFramework.PluginKit.UniversalApi.makeTranslationAsync

Translate message to specific language

Note: Use country codes for the Language argument

UniversalApi.makeTranslationAsync(Text, Language)
Text: String
Language: String

Returns String

Example

makeTranslationAsync("Hello, how are you?", "es") { translatedText ->
    sender.sendMessage(translatedText)
}

This example would change the string "Hello, how are you?" to Spanish asynchronously

Last updated