Show raw api
{
"functions": [
{
"name": "create",
"desc": "Creates a new localizedtextdata",
"params": [
{
"name": "translationKey",
"desc": "",
"lua_type": "string"
},
{
"name": "translationArgs",
"desc": "",
"lua_type": "TranslationArgs"
}
],
"returns": [
{
"desc": "",
"lua_type": "LocalizedTextData"
}
],
"function_type": "static",
"source": {
"line": 35,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "isLocalizedText",
"desc": "Returns whether the given argument is localized text",
"params": [
{
"name": "data",
"desc": "",
"lua_type": "any"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 50,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "formatByKeyRecursive",
"desc": "Recursively formats the translated text.",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "translationKey",
"desc": "",
"lua_type": "string"
},
{
"name": "translationArgs",
"desc": "",
"lua_type": "TranslationArgs?"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "string"
}
],
"function_type": "static",
"source": {
"line": 65,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "observeFormatByKeyRecursive",
"desc": "Observes the recursively formatted translated text.",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "translationKey",
"desc": "",
"lua_type": "string"
},
{
"name": "translationArgs",
"desc": "",
"lua_type": "TranslationArgs?"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<string>"
}
],
"function_type": "static",
"source": {
"line": 106,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "observeLocalizedTextToString",
"desc": "Observes the translations by string recursively",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "localizedText",
"desc": "",
"lua_type": "LocalizedTextData"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<string>"
}
],
"function_type": "static",
"source": {
"line": 146,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "localizedTextToString",
"desc": "Recursively formats the translated text\n\n:::tip\nUse LocalizedTextUtils.observeLocalizedTextToString(translator, localizedText, extraArgs)\n:::",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "localizedText",
"desc": "",
"lua_type": "LocalizedTextData"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "string"
}
],
"function_type": "static",
"source": {
"line": 169,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "fromJSON",
"desc": "Converts from JSON",
"params": [
{
"name": "text",
"desc": "",
"lua_type": "string"
}
],
"returns": [
{
"desc": "",
"lua_type": "LocalizedTextData?"
}
],
"function_type": "static",
"source": {
"line": 185,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "toJSON",
"desc": "Converts to JSON",
"params": [
{
"name": "localizedText",
"desc": "",
"lua_type": "LocalizedTextData"
}
],
"returns": [
{
"desc": "",
"lua_type": "string?"
}
],
"function_type": "static",
"source": {
"line": 204,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "setFromAttribute",
"desc": "Sets the translation data as an attribute on an instance.",
"params": [
{
"name": "obj",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
},
{
"name": "translationKey",
"desc": "",
"lua_type": "string"
},
{
"name": "translationArgs",
"desc": "",
"lua_type": "TranslationArgs"
}
],
"returns": [
{
"desc": "",
"lua_type": "LocalizedTextData"
}
],
"function_type": "static",
"source": {
"line": 219,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "getFromAttribute",
"desc": "Reads the data from the attribute",
"params": [
{
"name": "obj",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
}
],
"returns": [
{
"desc": "",
"lua_type": "LocalizedTextData"
}
],
"function_type": "static",
"source": {
"line": 233,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "getTranslationFromAttribute",
"desc": "Gets the translation from a given object's attribute",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "obj",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "string?"
}
],
"function_type": "static",
"source": {
"line": 253,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "initializeAttribute",
"desc": "Ensures an attribute is defined if nothing is there",
"params": [
{
"name": "obj",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
},
{
"name": "defaultTranslationKey",
"desc": "",
"lua_type": "string"
},
{
"name": "defaultTranslationArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 273,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "observeTranslation",
"desc": "Returns the translated string from the given object",
"params": [
{
"name": "translator",
"desc": "",
"lua_type": "Translator | JSONTranslator"
},
{
"name": "obj",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
},
{
"name": "extraArgs",
"desc": "",
"lua_type": "table?"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<string?>"
}
],
"function_type": "static",
"source": {
"line": 294,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
}
],
"properties": [],
"types": [
{
"name": "TranslationArgs",
"desc": "Valid translation args",
"lua_type": "{ [string]: LocalizedTextData | number | string }",
"source": {
"line": 20,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
},
{
"name": "LocalizedTextData",
"desc": "Valid localized text data",
"fields": [
{
"name": "translationKey",
"lua_type": "string",
"desc": ""
},
{
"name": "translationArgs",
"lua_type": "TranslationArgs",
"desc": ""
}
],
"source": {
"line": 28,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
}
],
"name": "LocalizedTextUtils",
"desc": "Localized text utils which changes translationKey structures to shared locations",
"source": {
"line": 5,
"path": "src/localizedtextutils/src/Shared/LocalizedTextUtils.lua"
}
}