Skip to main content

PseudoLocalize

Pseudo localizes text. Useful for verifying translation without having actual translations available

Properties

PSEUDO_CHARACTER_MAP

PseudoLocalize.PSEUDO_CHARACTER_MAP: {[string]string}

Mapping of English characters to pseudo localized characters.

Functions

pseudoLocalize

PseudoLocalize.pseudoLocalize(
linestring--

The line to translate

) → string--

The translated line

Translates a line into pseudo text while maintaining params

getDefaultPseudoLocaleId

PseudoLocalize.getDefaultPseudoLocaleId() → string

Gets the default pseudo locale string.

addToLocalizationTable

PseudoLocalize.addToLocalizationTable(
localizationTableLocalizationTable,--

LocalizationTable to add to.

preferredLocaleIdstring?,--

Preferred locale to use. Defaults to "qlp-pls"

preferredFromLocalestring?--

Preferred from locale. Defaults to "en-us"

) → string--

The translated line

Parses a localization table and adds a pseudo localized locale to the table.

Show raw api
{
    "functions": [
        {
            "name": "pseudoLocalize",
            "desc": "Translates a line into pseudo text while maintaining params",
            "params": [
                {
                    "name": "line",
                    "desc": "The line to translate",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "The translated line",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "src/pseudolocalize/src/Shared/PseudoLocalize.lua"
            }
        },
        {
            "name": "getDefaultPseudoLocaleId",
            "desc": "Gets the default pseudo locale string.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "src/pseudolocalize/src/Shared/PseudoLocalize.lua"
            }
        },
        {
            "name": "addToLocalizationTable",
            "desc": "Parses a localization table and adds a pseudo localized locale to the table.",
            "params": [
                {
                    "name": "localizationTable",
                    "desc": "LocalizationTable to add to.",
                    "lua_type": "LocalizationTable"
                },
                {
                    "name": "preferredLocaleId",
                    "desc": "Preferred locale to use. Defaults to \"qlp-pls\"",
                    "lua_type": "string?"
                },
                {
                    "name": "preferredFromLocale",
                    "desc": "Preferred from locale. Defaults to \"en-us\"",
                    "lua_type": "string?"
                }
            ],
            "returns": [
                {
                    "desc": "The translated line",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 56,
                "path": "src/pseudolocalize/src/Shared/PseudoLocalize.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "PSEUDO_CHARACTER_MAP",
            "desc": "Mapping of English characters to pseudo localized characters.",
            "lua_type": "{ [string]: string }",
            "source": {
                "line": 81,
                "path": "src/pseudolocalize/src/Shared/PseudoLocalize.lua"
            }
        }
    ],
    "types": [],
    "name": "PseudoLocalize",
    "desc": "Pseudo localizes text. Useful for verifying translation without having\nactual translations available",
    "source": {
        "line": 7,
        "path": "src/pseudolocalize/src/Shared/PseudoLocalize.lua"
    }
}