First, require the Roblox Translate Module
local robloxtranslate = require(game.Workspace.RobloxTranslateModule)
How to call the function
robloxtranslate.translate("language", "text")
As language use language code you want to translate to
("en"
)
or language code to translate from-to ("en-ru"
)
As a text use anything you want to translate ("hello"
)
The function returns a string with translation
Translate function can only be called by game server
Example:
print(translate("en-ru", "hi"))
Output:
привет
translation from English to Russian