Skip to content

Localization

Wngui edited this page Jun 24, 2025 · 2 revisions

The plugin uses a localization system to display in-game text, enabling multi-language support through JSON-based translation files.

The language shown to players is determined by the server’s configured language. You can change this setting in the core.json file located at:

.\addons\counterstrikesharp\configs\core.json

How Localization Works

Translation files are located in addons/counterstrikesharp/plugins/WarcraftPlugin/lang/ The naming follows a 2 letter ISO code.

en.json (English)
ru.json (Russian)
...

Within these files, you'll find keys and values

"shadowblade.venomstrike": "{Green}Poisoned {LightYellow}{0} {Green}for {DarkRed}{1} {Green}damage!"

This is then used in code like this

Player.PrintToChat(" " + Localizer["shadowblade.venomstrike", Victim.GetRealPlayerName(), damage]);

Which prints something like this in the game Poisoned BoinK for 6 damage!

Localizations for custom heroes

It's possible to create localization files for your custom heroes.

  1. Create a new file, with the name of your hero and language, WarcraftPlugin\lang\myhero.en.json (English)
  2. Add translation keys and values
  3. Use in code

Abilities

The translation keys for abilities are assumed to follow the format

"<heroName>.ability.<abilityNumber>": "<translation>"

Example

"shadowblade.ability.0": "Shadowstep"

Clone this wiki locally