Translation
import org.UniversalDevelopment.universalChat.UniversalPluginFramework.PluginKit.UniversalApi.makeTranslationTranslate message to specific language
Note: Use country codes for the Language argument
UniversalApi.makeTranslation(Text, Language)
Text: String
Language: String
Returns StringExample
makeTranslation("Hello!", "de")This example would change the string "Hello!" to German (de)
Async translation [RECOMMENDED]
import org.UniversalDevelopment.universalChat.UniversalPluginFramework.PluginKit.UniversalApi.makeTranslationAsyncTranslate message to specific language
Note: Use country codes for the Language argument
UniversalApi.makeTranslationAsync(Text, Language)
Text: String
Language: String
Returns StringExample
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