cs_translate is a small, cross-platform CLI tool that watches your Counter-Strike 2 console.log in real time and automatically translates in-game chat messages to a target language (default: English), printing the results in your terminal.
It is read-only:
- It does not send messages back into the game.
- It does not touch your CS2 config files.
- It simply reads
console.log, detects chat lines, translates them, and prints them.
This makes it ideal if you just want to understand what people are saying in chat without spamming in-game messages or messing with binds.
-
🧠 Automatic chat translation
- Watches
console.logfor chat lines like:[CT] PlayerName: message[T] PlayerName: message[ALL] PlayerName: message
- Translates each chat message to a target language (default:
en). - Prints readable logs, for example:
💬 [T] Player123: Привет, как дела? 🌍 [T] Player123 (Russian → EN): Hello, how are you?
- Watches
-
🌍 Language detection + Cyrillic heuristic
- Uses Google’s language detection via
google-translate-api-x. - If the message contains Cyrillic characters but detection is not
ru, it can optionally retry assuming Russian to improve accuracy.
- Uses Google’s language detection via
-
📦 Cross-platform
- Works on Linux and Windows (Node.js-based).
- No platform-specific dependencies beyond Node itself.
-
⚙️ Simple config
- Only one setting: the path to
console.log. - Config stored in a small
config.jsonfile.
- Only one setting: the path to
- CS2 must be started with the launch option
-condebug.
That makes the game write console output toconsole.log. cs_translatetails that file (usingfs.watchFile) and parses new lines.- For each line matching the chat pattern
"[TEAM] Player: message":- It logs the original message to the terminal.
- It auto-translates the message to the configured target language (default
en). - If the source language is different from the target, it prints the translation.
- Non-chat lines are ignored.
The tool never writes back to CS2 or the file system (beyond its own config file).
-
OS
- Linux
- Windows
-
Runtime
- Node.js 18+ (or newer)
- Internet access (for Google Translate)
-
Node dependencies (handled via
npm install)google-translate-api-x(translation)chalk(colored terminal output)
cs_translate depends on CS2 writing its console output to a file.
You must enable -condebug:
- Open Steam.
- Go to Library → Right-click on Counter-Strike 2 → Properties….
- Under Launch Options, add:
-condebug - Start CS2 once so that the
console.logfile is created.
Typical default locations for console.log are:
-
Linux (Steam / Proton)
~/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/console.log -
Windows (default Steam path, may differ on your system)
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\console.log
You can (and should) override this path in the cs_translate config if your setup differs.
cs_translate stores its settings in a simple JSON file containing only the logPath.
-
Linux
-
If
$XDG_CONFIG_HOMEis set:$XDG_CONFIG_HOME/cs_translate/config.json -
Otherwise:
~/.config/cs_translate/config.json
-
-
Windows
-
Uses
%APPDATA%:%APPDATA%\cs_translate\config.json -
Example:
C:\Users\YourName\AppData\Roaming\cs_translate\config.json
-
{
"logPath": "/full/path/to/your/cs2/console.log"
}On Windows it will look like:
{
"logPath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Global Offensive\\game\\csgo\\console.log"
}(Backslashes are automatically escaped in JSON.)
You rarely need to edit config.json by hand. The CLI provides helpers:
-
Initialize or refresh the config file:
cs_translate --init-config
-
Set the path to
console.log:cs_translate --set-log-path /full/path/to/console.log
On Windows PowerShell / CMD:
cs_translate --set-log-path "C:\full\path\to\console.log"
-
Show help:
cs_translate --help
If you are on Arch or an Arch-based distro (EndeavourOS, Artix, etc.), you can install cs_translate from the AUR:
yay -S cs_translate
# or
paru -S cs_translateThis will:
- install the Node app under
/usr/lib/cs_translate - create a launcher script at
/usr/bin/cs_translate
After installation:
cs_translate --init-config
cs_translateIf you want to run it directly from source:
-
Clone the repo:
git clone https://github.com/MeckeDev/cs_translate.git cd cs_translate -
Install dependencies:
npm install
-
Make sure the CLI script is executable (on Linux/macOS):
chmod +x bin/cs_translate.js
-
Run directly:
node bin/cs_translate.js --help node bin/cs_translate.js --init-config node bin/cs_translate.js
Or globally link it as cs_translate:
npm link
cs_translate --help-
Ensure CS2 is started with
-condebug(see above). -
Initialize the config:
cs_translate --init-config
This will create a
config.jsonwith a best-guesslogPath. -
If necessary, fix the
logPath:cs_translate --set-log-path /full/path/to/console.log
Start the tool in a terminal:
cs_translateYou should see a banner similar to:
🚀 CS2 Chat Auto Translator (watching console.log)
Configuration:
logPath: /full/path/to/console.log
Behavior:
• All detected chat messages are translated to 'EN' and printed here.
• This tool never sends anything back to the game. It is read-only.
Leave this terminal open while you play CS2.
When players chat in game, you’ll see output like:
💬 [T] Ivan: Привет, как дела?
🌍 [T] Ivan (Russian → EN): Hello, how are you?
💬 [ALL] Juan: buenos dias amigos
🌍 [ALL] Juan (Spanish → EN): good morning friends
If the source language is already English (or your configured target), the tool may skip printing a translation to keep noise low.
If you see:
❌ console.log not found: /some/path/console.log
Make sure CS2 is running with '-condebug' and that the path is correct.
Check:
- CS2 launch options include
-condebug. console.logactually exists at the specified path.- The path in your config is correct.
You can fix the path with:
cs_translate --set-log-path /correct/path/to/console.log- Make sure there is actual chat activity in your CS2 match.
- Ensure
AUTO_TRANSLATEis enabled in the code (by default it is). - Verify that your system has internet access for the translation API.
- If only English appears in chat, the tool might skip translations because source = target.
The tool relies on google-translate-api-x, which scrapes the public Translate API. In rare cases:
- It may be slow or temporarily rate-limited.
- You may see warnings like
Translation failed: ...in the terminal.
In those cases, the tool will fall back to printing the original text.
To hack on cs_translate:
git clone https://github.com/MeckeDev/cs_translate.git
cd cs_translate
npm install
# Run with debug logs
node bin/cs_translate.js --init-config
node bin/cs_translate.jsYou can:
- Change the target language.
- Adjust the heuristics (e.g. for Cyrillic).
- Add additional filtering, logging, or custom output formats.
If you publish a modified version, please respect the project’s license.
cs_translate is open source software.
See the LICENSE file in the repository for full license details.