Skip to content

Repository files navigation

CS2 Translator Overlay

A lightweight real-time Counter-Strike 2 chat translator for Windows.

CS2 Translator Overlay watches CS2's console.log, filters player communication, translates incoming chat messages to your selected language, and displays them in a compact always-on-top overlay on the left, center, or right side of your selected screen.

The application reads log output only. It does not inject into CS2, modify game files, automate gameplay, or send commands to the game.

Features

  • Real-time CS2 chat monitoring
  • Automatic per-message language detection
  • Selectable translation target (English, Dutch, French, German, Spanish and more)
  • User / CS2 language setting for localized chat filtering
  • Strict player-chat filtering
  • Supports [ALL], [CT], [T], team and spectator chat
  • Filters game, engine, console and server messages
  • Auto-collapsing always-on-top Windows overlay
  • New messages expand the overlay for 10 seconds, then it collapses back to a small control bar
  • Multi-monitor support: choose which screen shows the overlay
  • Horizontal placement: Left, Center or Right on the selected screen
  • Automatic Steam / CS2 log-path detection
  • Optional display of the original message
  • Optional filtering of your own messages
  • Adjustable opacity, width and visible message count
  • No third-party Python packages required to run the source version
  • Does not inject into or modify Counter-Strike 2

How it works

CS2 can write console output to:

...\Counter-Strike Global Offensive\game\csgo\console.log

This project watches that file for new lines. Only lines that match player-chat structures are accepted. The parser supports localized/custom chat labels and rejects known engine/debug categories. Matching chat messages are auto-detected, translated to the selected target language and displayed in the overlay.

Example:

[T] Spieler: Gehen wir B

becomes:

[T] Spieler
Let's go B

Installation

Option 1 — Download a Windows release

When a compiled release is available:

  1. Open the repository's Releases page.
  2. Download CS2-Translator.exe.
  3. Add -condebug to the CS2 launch options as described below.
  4. Start CS2.
  5. Start CS2-Translator.exe.

No Python installation is needed for the compiled release.

Option 2 — Run from Python source

Requirements:

  • Windows 10 or Windows 11
  • Python 3.10+
  • Internet connection for translation

Clone/download this repository and run:

START_CS2_TRANSLATOR.bat

or:

pythonw CS2_Translator_Overlay.py

The normal Windows Python installer includes Tkinter.

CS2 setup

In Steam:

Library
→ Counter-Strike 2
→ Properties
→ Launch Options

Add:

-condebug

Start CS2 once. The game should create a log file at a path similar to:

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\console.log

The application attempts to detect the Steam library automatically. If it finds the wrong path, open the overlay settings using the gear icon and select console.log manually.

Overlay notes

The overlay is a normal Windows always-on-top window. Borderless / Fullscreen Windowed is recommended.

Exclusive fullscreen can render normal desktop overlays behind the game.

Automatic collapse

When there is no active chat, only a small control bar remains visible. A new player message automatically expands the overlay. The translated message stays visible for 10 seconds after translation completes; additional messages restart the timer. When the timer expires, the message area collapses and its temporary history is cleared.

Languages

In Settings you can choose:

  • Your / CS2 language — used to improve filtering of localized chat/system markers such as French MORT/SERVEUR, German TOT, Spanish EQUIPO, and similar labels.
  • Translate chat to — the language used for displayed translations. Incoming chat language is detected automatically per message.

Current translation targets include English, Dutch, French, German, Spanish, Italian, Portuguese, Polish, Russian, Turkish, Ukrainian, Swedish, Czech, Danish, Norwegian, Finnish, Japanese, Korean and Simplified Chinese.

Multiple monitors

Open the gear icon and select Overlay screen to move the translator to another connected monitor. Use Overlay position on screen to place it on the Left, Center or Right side of that monitor. Both selections are remembered between launches. If the selected monitor is disconnected later, the app automatically falls back to the primary display.

Chat filtering

The parser deliberately accepts only known player-communication formats. It does not accept arbitrary bracketed console categories.

Accepted examples include:

[ALL] Player: hello
[CT] Player: rotate B
[T] Player: rush A

Valve-style say and say_team log lines are also supported.

Examples of output that is intentionally ignored include engine/system categories such as:

[SOUND]
[CLIENT]
[NETWORK]
[CL CommandQueue]
[SteamNetSockets]
[ResourceSystem]
[Localization System]
[Networking]
[server]
[splitscreen]
[prediction]

Pseudo-users such as Console, Server, CS2 and Game are also filtered.

Translation and privacy

The current version uses the Google Translate web endpoint to translate chat text. This means the message text being translated is sent over the internet to Google's translation service.

The application itself does not upload the full CS2 log and does not require a user account.

Because the translation endpoint used by this project is not a paid authenticated Google Cloud Translation API integration, its availability and rate limits can change. The app now retries unchanged foreign-language results using the detected source language, falls back to a second Google Translate endpoint, and clearly marks translation failures instead of presenting the original text as a successful translation.

Configuration

Settings are saved locally at:

%APPDATA%\CS2 Translator Overlay\config.json

Available settings include:

  • CS2 console.log path
  • Your player name
  • Show original message
  • Overlay opacity
  • Overlay width
  • Number of visible messages
  • Overlay screen / monitor
  • Overlay horizontal position (Left / Center / Right)
  • Your / CS2 language
  • Translation target language

Building the Windows executable

Install PyInstaller:

py -m pip install -r requirements-dev.txt

Then run:

BUILD_EXE.bat

The executable will be written to:

dist\CS2-Translator.exe

GitHub Actions is also configured to build a Windows executable automatically.

Automated GitHub releases

The workflow in .github/workflows/release-windows.yml:

  • runs on Windows;
  • checks the Python source;
  • builds a single-file GUI executable with PyInstaller;
  • uploads the executable as a workflow artifact;
  • attaches CS2-Translator.exe to the GitHub Release when the workflow is triggered by a v* tag.

A typical release flow is:

git tag v0.4.2
git push origin v0.4.2

Then create/publish a GitHub Release for that tag if needed.

GitHub Pages

A simple project landing page is included in the docs/ folder.

To enable it on GitHub:

  1. Open Settings in the repository.
  2. Open Pages.
  3. Under Build and deployment, choose Deploy from a branch.
  4. Select your main branch and /docs.
  5. Save.

GitHub will show the public Pages URL after deployment.

Development

Run parser tests with:

py -m unittest discover -s tests -v

The parser should remain strict. Avoid broad expressions that treat arbitrary console categories as chat, because console.log contains large amounts of non-chat engine output.

Disclaimer

This is an independent community project and is not affiliated with, endorsed by, or sponsored by Valve Corporation or Counter-Strike 2.

Counter-Strike, Counter-Strike 2, Steam and Valve are trademarks or registered trademarks of their respective owners.

Use the software at your own risk. Game behavior, log formats and third-party translation services can change over time.

License

Licensed under the MIT License.

About

Real-time Counter-Strike 2 chat translator overlay for Windows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages