- Documentation
- Client functions
- getLocalization
Function
getLocalization
Returns the player's language (the same one chosen in the launcher and game settings) as a table with a code and a name. Codes: pl, en, de, es, fr, it, pt, ru, uk, tr, cs, ro. The server knows the same language through getPlayerLocalization.
Syntax
table getLocalization()Returns
E.g. { code = "de", name = "Deutsch" }.
Example
local lang = getLocalization()
outputChatBox("Język: " .. lang.name)
See also
getKeyboardLayoutReturns the player's keyboard layout (name and identifier). In the current client version the function is not wired to the game yet and returnsfalsewith a console warning.getPlayerLocalizationReturns the player's language chosen in the launcher (the same one the client sees ingetLocalization). Useful for sending messages to everyone in their own language. A player with an older client gets Polish.