Skip to main content

TableLocaleLoader

Loads a table-driven translator's already-decoded, in-memory entries. The data is a single locale already in memory, so there is no per-locale laziness -- every entry point queues the full set once.

Writes land on the TranslatorService resolved from the ServiceBag passed to the constructor. Shares the loader surface (LoadSourceLocale / LoadLocale / LoadAllLocales) with InstanceLocaleLoader so JSONTranslator can drive either the same way.

Functions

new

TableLocaleLoader.new(
serviceBagServiceBag,--

provides the TranslatorService writes land on

entries{any}--

already-decoded localization entries

) → TableLocaleLoader

LoadSourceLocale

TableLocaleLoader.LoadSourceLocale(selfTableLocaleLoader) → ()

Queues the entries. See TableLocaleLoader.

LoadAllLocales

TableLocaleLoader.LoadAllLocales(selfTableLocaleLoader) → ()

Queues the entries. See TableLocaleLoader.

LoadLocale

TableLocaleLoader.LoadLocale(
_localeIdstring
) → ()

Queues the entries. In-memory data is fully loaded up front, so there is nothing to defer for a specific locale.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "provides the [TranslatorService] writes land on",
                    "lua_type": "ServiceBag"
                },
                {
                    "name": "entries",
                    "desc": "already-decoded localization entries",
                    "lua_type": "{ any }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "TableLocaleLoader"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/clienttranslator/src/Shared/Loaders/TableLocaleLoader.lua"
            }
        },
        {
            "name": "LoadSourceLocale",
            "desc": "Queues the entries. See [TableLocaleLoader].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TableLocaleLoader"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 53,
                "path": "src/clienttranslator/src/Shared/Loaders/TableLocaleLoader.lua"
            }
        },
        {
            "name": "LoadAllLocales",
            "desc": "Queues the entries. See [TableLocaleLoader].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TableLocaleLoader"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 60,
                "path": "src/clienttranslator/src/Shared/Loaders/TableLocaleLoader.lua"
            }
        },
        {
            "name": "LoadLocale",
            "desc": "Queues the entries. In-memory data is fully loaded up front, so there is nothing to\ndefer for a specific locale.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TableLocaleLoader"
                },
                {
                    "name": "_localeId",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 70,
                "path": "src/clienttranslator/src/Shared/Loaders/TableLocaleLoader.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TableLocaleLoader",
    "desc": "Loads a table-driven translator's already-decoded, in-memory entries. The data is a\nsingle locale already in memory, so there is no per-locale laziness -- every entry\npoint queues the full set once.\n\nWrites land on the [TranslatorService] resolved from the [ServiceBag] passed to the\nconstructor. Shares the loader surface (LoadSourceLocale / LoadLocale / LoadAllLocales)\nwith [InstanceLocaleLoader] so [JSONTranslator] can drive either the same way.",
    "source": {
        "line": 13,
        "path": "src/clienttranslator/src/Shared/Loaders/TableLocaleLoader.lua"
    }
}