Abbreviation of the new Language.
Optionalmetadata: anyAny information that we would want to show/update inside a GUI application about this Library. This is not used by the API by default, but we can reprogram the Library's prototype to make use of this value if we want.
void.
StaticcurrentThis is the global current language instance. You can change this value directly. Defaults to null.
The abbreviation of this Language.
The main data object that has all of the Language data of this API.
The language data for the errors of this API. Must map all error codes to template strings.
StaticresolveConverts a template string to a normal string using the given parameters in arr.
template string may include placeholders to represent the parameters. ("$1" for first
parameter, "$2" for second parameter, and so on.) template string may also include
the ? operator for simple conditioning. You may look at the language files for examples.
The template string to convert
Parameters to replace the placeholders in the template string.
A finalized version of the template string that has all the placeholders
replaced by the parameters, or null if something went wrong.
This function is called internally inside the constructor of all Addons by default.
The function body is empty by default. This means that the metadata values are not
stored in Addon objects by default, because they are not useful in a non-GUI
node.js environment. If we want to make use of the metadata, we might override
this behavior by overriding this method. Remember that this should be done after
initializing the API and before initializing any Addons.
Optionalmetadata: anyAn object that holds some metadata values. This value might depend on what you want to do with this API. The examples in the GitHub repo are intended to be shown in a web application GUI that can be accessed by anyone. Therefore, they use the following structure for this object:
name: string: Name of the RoomConfig that will be displayed on the GUI.version: number: The current version number of this RoomConfig.author: string: The author of this RoomConfig.description: string: A detailed description of this RoomConfig.allowFlags: int: This value defines whether it is possible to use this Addon
while hosting or joining (or both) a room. Renderers do not use this key.void.
Creates a new
Languageinstance.