Translate

- Documented class
- Documented `translate`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-06-18 12:57:29 +02:00
parent 83304fd1ce
commit 291e85dcf2
1 changed files with 10 additions and 1 deletions

View File

@ -10,7 +10,9 @@ import birchwood.protocol.messages : Message;
import std.json : parseJSON, JSONException, JSONValue;
import std.net.curl : CurlException;
// TODO: Implement me
/**
* Translation module
*/
public final class Translate : Mod
{
private static string commandStr = ".tr";
@ -62,6 +64,13 @@ public final class Translate : Mod
}
}
/**
* Translates the provided text into the given language (default `"en"` for English)
*
* Params:
* inputText = the text to translate
* Returns: the translated text
*/
private static string translate(string inputText, string toLang = "en")
{
string translatedText;