Translating
SourceBans++ ships with English as the default. Translating into
another language has two halves — the web panel (theme-based) and
the in-game plugin (SourceMod’s standard .phrases.txt files).
Web panel
Section titled “Web panel”The web panel’s UI strings live inside the active theme’s templates, not in a separate translation file. To translate the panel, you make a copy of the default theme, swap the English copy for your translations, and select your new theme in the panel’s settings.
-
Copy the default theme. Navigate to
themes/under your SourceBans++ web install, copy thedefault/folder, and rename the copy to something distinctive (e.g.german,default-fr). -
Edit
theme.conf.phpin your new theme. Update the metadata so the panel’s theme picker displays your theme correctly:<?phpdefine('theme_name', "SourceBans++ — Deutsch");define('theme_author', "Your name");define('theme_version', "1.0.0");define('theme_link', "https://your-site.example.com");define('theme_screenshot', "screenshot.jpg");?> -
Translate each
.tplfile. Open the.tplfiles in your theme directory and replace the English copy with your translation. Don’t touch the parts wrapped in{...}— those are template variables Smarty fills in at render time. -
Activate your theme. Sign in as an admin with Web settings permission, navigate to Admin Panel → Settings → Themes, and pick your new theme.
SourceMod plugin
Section titled “SourceMod plugin”The plugin uses SourceMod’s standard translation files (per-plugin
.phrases.txt under addons/sourcemod/translations/).
-
Open SourceMod’s
translations/directory on your game server. -
The plugin translation files are:
sbpp_main.phrases.txtsbpp_comms.phrases.txtsbpp_sleuth.phrases.txtsbpp_report.phrases.txtsbpp_checker.phrases.txt
-
Each file has a
Phrasesblock with named entries:"MyPhrase"{"en" "Hello, {1}""#format" "{1:s}"}Add a line for your language using the two-letter language code:
"MyPhrase"{"en" "Hello, {1}""fr" "Bonjour, {1}""#format" "{1:s}"}- Keep the
{1},{2}, … placeholders in the same positions — they’re how SourceMod injects player names, durations, etc. - If
#formatis present, follow its formatter spec (see SourceMod’s Translations docs).
- Keep the
-
Reload the map (or restart the server) so SourceMod reloads its translation cache.
Each connecting player gets phrases in their Steam client’s language. If their language has no translation entry, SourceMod falls back to English.
Contributing translations back
Section titled “Contributing translations back”We always welcome translation PRs against
sbpp/sourcebans-pp — both
panel theme translations and plugin phrase translations.
For the panel, the practical path is to keep the default theme’s structure and only swap the visible text, so the PR is a clean diff. For the plugin, add your language entries inside the existing phrase blocks.