The client library for the TransAPI API for Cuberite.
- Copy transapi.lua into your plugin folder.
- Create a directory in your plugin folder called
- Create a file named [whatever].lua in the languages directory, and add translations to it as per the examples file. Your should probably have languages in their own files.
GetTranslation(cPlayer, Slug (string)) - Returns the translated string for the provided cPlayer object. GetConsoleTranslation(Slug (string)) - Returns the translated string for the console.
- TransAPI should not be used for startup logging, as it requires the TransAPI helper plugin to be loaded before yours.
- TransAPI requires that the global var
g_Languagesis not defined or used outside of itself.
The TransAPI client lib is licensed under the MIT license, so you are free to improve and build upon it.