GetPlayerLanguage
The language the player’s game shows its texts in.
A code - "en", "cs", "de", "fr", "es", "it", "pl", "ru", "pt", "tr", "uk", "ja", "ko",
"zh-cn", "zh-tw", "vi". Known once their level has loaded: from OnPlayerRequestSpawn on, nil in
OnPlayerConnect.
Syntax
Section titled “Syntax”GetPlayerLanguage(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”string - the language’s code; nil before it is known
Example
Section titled “Example”function OnPlayerSpawn(pid) if GetPlayerLanguage(pid) == "de" then SendClientMessage(pid, COLOR_WHITE, "Willkommen!") endendSee also
Section titled “See also”SetTextOverride · the The game’s texts group of the index
