localize
The localize table resolves CS:GOβs internal localization dictionaries directly without JavaScript or Panorama bridges.
Functions
Section titled βFunctionsβ| Function | Parameters | Returns | Description |
|---|---|---|---|
localize |
token: string, params?: table |
string |
Callable table: translates token and substitutes %variable% placeholders. |
localize.localize |
token: string, params?: table |
string |
Alias of callable table function. |
localize.find |
token: string |
string |
Returns raw translation template string without variable substitution. |
localize.language |
(none) | string |
Returns active game language name (e.g. "english", "german", "russian"). |
- An unknown token is returned as-is without raising an error.
Example
Section titled βExampleβ-- Resolving standard weapon tokenlocal ak_name = localize("#SFUI_WPNHUD_AK47")print(ak_name) --> "AK-47"
-- Parameterized localization tokenlocal msg = localize("#Chat_SavePlayer", { ["1"] = "Alice", ["2"] = "Bob" })print(msg)