Skip to main content

TranslatorService

Handles selecting the right locale/translator for Studio, and Roblox games.

Functions

ObserveTranslator

TranslatorService:ObserveTranslator() → Observable<Translator>

Observes Roblox translator

PromiseTranslator

TranslatorService:PromiseTranslator() → Observable<Translator>

Promises the Roblox translator

GetTranslator

TranslatorService:GetTranslator() → Translator?

Gets the current translator to use

ObserveLocaleId

TranslatorService:ObserveLocaleId() → Observable<string>

Observes the current locale id for this translator.

GetLocaleId

TranslatorService:GetLocaleId() → string

Gets the localeId to use

Show raw api
{
    "functions": [
        {
            "name": "ObserveTranslator",
            "desc": "Observes Roblox translator",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Translator>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 63,
                "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
            }
        },
        {
            "name": "PromiseTranslator",
            "desc": "Promises the Roblox translator",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Translator>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 72,
                "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
            }
        },
        {
            "name": "GetTranslator",
            "desc": "Gets the current translator to use",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Translator?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 112,
                "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
            }
        },
        {
            "name": "ObserveLocaleId",
            "desc": "Observes the current locale id for this translator.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<string>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 121,
                "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
            }
        },
        {
            "name": "GetLocaleId",
            "desc": "Gets the localeId to use",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 156,
                "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TranslatorService",
    "desc": "Handles selecting the right locale/translator for Studio, and Roblox games.",
    "source": {
        "line": 6,
        "path": "src/clienttranslator/src/Shared/TranslatorService.lua"
    }
}